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

Percentage Accurate: 72.9% → 80.6%
Time: 21.8s
Alternatives: 26
Speedup: 0.9×

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 26 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: 72.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: 80.6% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.05e9 or 4.8e14 < a

    1. Initial program 64.1%

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

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

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

    if -1.05e9 < a < 4.8e14

    1. Initial program 80.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 t around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 78.2% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 6.5e-85

    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 0

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

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

    if 6.5e-85 < t

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

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

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

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

Alternative 3: 78.4% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 6.5e-85

    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 0

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

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

    if 6.5e-85 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 77.9% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 4.7000000000000002e198

    1. Initial program 73.7%

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

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

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

    if 4.7000000000000002e198 < 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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(b\right)}, x \cdot y\right) \]
      9. neg-sub0N/A

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

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

        \[\leadsto z \cdot \mathsf{fma}\left(c, 0 - b, \color{blue}{y \cdot x}\right) \]
      12. *-lowering-*.f6489.2

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

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

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

Alternative 5: 52.4% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y \leq -1.12 \cdot 10^{+43}:\\
\;\;\;\;z \cdot \mathsf{fma}\left(c, 0 - b, x \cdot y\right)\\

\mathbf{elif}\;y \leq -1.1 \cdot 10^{-139}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(a, 0 - x, b \cdot i\right)\\

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

\mathbf{elif}\;y \leq 600000000:\\
\;\;\;\;a \cdot \mathsf{fma}\left(j, c, 0 - t \cdot x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -1.70000000000000005e121

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

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

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

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

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

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

        \[\leadsto y \cdot \left(x \cdot z + \color{blue}{\left(\mathsf{neg}\left(i \cdot j\right)\right)}\right) \]
      4. unsub-negN/A

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

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

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

        \[\leadsto y \cdot \left(\color{blue}{z \cdot x} - i \cdot j\right) \]
      8. *-lowering-*.f6477.0

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

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

    if -1.70000000000000005e121 < y < -1.12e43

    1. Initial program 68.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(b\right)}, x \cdot y\right) \]
      9. neg-sub0N/A

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

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

        \[\leadsto z \cdot \mathsf{fma}\left(c, 0 - b, \color{blue}{y \cdot x}\right) \]
      12. *-lowering-*.f6468.9

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

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

    if -1.12e43 < y < -1.10000000000000005e-139

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.10000000000000005e-139 < y < -8.99999999999999987e-250

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

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

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

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

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

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

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

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

    if -8.99999999999999987e-250 < y < 6e8

    1. Initial program 76.4%

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{0 - t \cdot x}\right) \]
      8. *-lowering-*.f6453.7

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

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

    if 6e8 < y

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \mathsf{fma}\left(j, 0 - i, \color{blue}{z \cdot x}\right) \]
      9. *-lowering-*.f6477.4

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

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

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

Alternative 6: 61.8% accurate, 1.2× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.54999999999999999e91

    1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

    if -1.54999999999999999e91 < y < -5.3000000000000001e-160

    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 j around 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. Step-by-step derivation
      1. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.3000000000000001e-160 < y < 4.3e63

    1. Initial program 75.8%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(j, c, 0 - t \cdot x\right), \color{blue}{b \cdot \left(i \cdot t\right)}\right) \]
      2. *-lowering-*.f6470.1

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

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

    if 4.3e63 < y

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \mathsf{fma}\left(j, 0 - i, \color{blue}{z \cdot x}\right) \]
      9. *-lowering-*.f6481.2

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

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

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

Alternative 7: 52.3% accurate, 1.4× speedup?

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

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

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

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

\mathbf{elif}\;y \leq 520000000000:\\
\;\;\;\;a \cdot \mathsf{fma}\left(j, c, 0 - t \cdot x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -4.2000000000000001e32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(j, a \cdot c - i \cdot y, x \cdot \color{blue}{\left(z \cdot y\right)}\right) \]
      3. *-lowering-*.f6473.0

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

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

    if -4.2000000000000001e32 < y < -4.20000000000000016e-139

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.20000000000000016e-139 < y < -6.20000000000000006e-251

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

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

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

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

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

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

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

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

    if -6.20000000000000006e-251 < y < 5.2e11

    1. Initial program 76.4%

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{0 - t \cdot x}\right) \]
      8. *-lowering-*.f6453.7

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

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

    if 5.2e11 < y

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \mathsf{fma}\left(j, 0 - i, \color{blue}{z \cdot x}\right) \]
      9. *-lowering-*.f6477.4

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

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

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

Alternative 8: 52.8% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;y \leq -1.18 \cdot 10^{-138}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(a, 0 - x, b \cdot i\right)\\

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

\mathbf{elif}\;y \leq 900000000000:\\
\;\;\;\;a \cdot \mathsf{fma}\left(j, c, 0 - t \cdot x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -2.40000000000000019e47

    1. Initial program 67.4%

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

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

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

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

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

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

        \[\leadsto y \cdot \left(x \cdot z + \color{blue}{\left(\mathsf{neg}\left(i \cdot j\right)\right)}\right) \]
      4. unsub-negN/A

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

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

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

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

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

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

    if -2.40000000000000019e47 < y < -1.18e-138

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.18e-138 < y < -4.00000000000000006e-251

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

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

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

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

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

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

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

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

    if -4.00000000000000006e-251 < y < 9e11

    1. Initial program 76.4%

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{0 - t \cdot x}\right) \]
      8. *-lowering-*.f6453.7

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

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

    if 9e11 < y

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \mathsf{fma}\left(j, 0 - i, \color{blue}{z \cdot x}\right) \]
      9. *-lowering-*.f6477.4

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

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

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

Alternative 9: 52.5% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;y \leq -2.4 \cdot 10^{-138}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(a, 0 - x, b \cdot i\right)\\

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

\mathbf{elif}\;y \leq 255000000000:\\
\;\;\;\;a \cdot \mathsf{fma}\left(j, c, 0 - t \cdot x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.4999999999999998e44 or 2.55e11 < y

    1. Initial program 72.3%

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

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

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

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

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

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

        \[\leadsto y \cdot \left(x \cdot z + \color{blue}{\left(\mathsf{neg}\left(i \cdot j\right)\right)}\right) \]
      4. unsub-negN/A

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

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

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

        \[\leadsto y \cdot \left(\color{blue}{z \cdot x} - i \cdot j\right) \]
      8. *-lowering-*.f6471.6

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

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

    if -2.4999999999999998e44 < y < -2.3999999999999999e-138

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.3999999999999999e-138 < y < -1.05999999999999993e-250

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

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

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

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

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

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

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

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

    if -1.05999999999999993e-250 < y < 2.55e11

    1. Initial program 76.4%

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{0 - t \cdot x}\right) \]
      8. *-lowering-*.f6453.7

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+44}:\\ \;\;\;\;y \cdot \left(x \cdot z - j \cdot i\right)\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{-138}:\\ \;\;\;\;t \cdot \mathsf{fma}\left(a, 0 - x, b \cdot i\right)\\ \mathbf{elif}\;y \leq -1.06 \cdot 10^{-250}:\\ \;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\ \mathbf{elif}\;y \leq 255000000000:\\ \;\;\;\;a \cdot \mathsf{fma}\left(j, c, 0 - t \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot z - j \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 60.1% accurate, 1.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.9999999999999999e51

    1. Initial program 66.9%

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

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

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

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

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

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

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

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

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

    if -9.9999999999999999e51 < y < 3.2999999999999998e61

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(j, c, 0 - t \cdot x\right), \color{blue}{b \cdot \left(i \cdot t\right)}\right) \]
      2. *-lowering-*.f6468.2

        \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(j, c, 0 - t \cdot x\right), b \cdot \color{blue}{\left(i \cdot t\right)}\right) \]
    7. Simplified68.2%

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

    if 3.2999999999999998e61 < y

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \mathsf{fma}\left(j, 0 - i, \color{blue}{z \cdot x}\right) \]
      9. *-lowering-*.f6481.2

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

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

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

Alternative 11: 59.6% accurate, 1.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.59999999999999989e49

    1. Initial program 66.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(j, a \cdot c - i \cdot y, x \cdot \color{blue}{\left(z \cdot y\right)}\right) \]
      3. *-lowering-*.f6474.1

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

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

    if -2.59999999999999989e49 < y < 1.6499999999999999e61

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(j, c, 0 - t \cdot x\right), \color{blue}{b \cdot \left(i \cdot t\right)}\right) \]
      2. *-lowering-*.f6468.2

        \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(j, c, 0 - t \cdot x\right), b \cdot \color{blue}{\left(i \cdot t\right)}\right) \]
    7. Simplified68.2%

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

    if 1.6499999999999999e61 < y

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \mathsf{fma}\left(j, 0 - i, \color{blue}{z \cdot x}\right) \]
      9. *-lowering-*.f6481.2

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

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

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

Alternative 12: 60.1% accurate, 1.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -1.2599999999999999e-129 or 2.6499999999999999e-17 < j

    1. Initial program 73.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 t around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(j, a \cdot c - i \cdot y, x \cdot \color{blue}{\left(z \cdot y\right)}\right) \]
      3. *-lowering-*.f6468.7

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

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

    if -1.2599999999999999e-129 < j < 2.6499999999999999e-17

    1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(y \cdot z - a \cdot t\right) + i \cdot \left(-1 \cdot \left(j \cdot y\right) + \color{blue}{1 \cdot \left(b \cdot t\right)}\right) \]
      14. metadata-evalN/A

        \[\leadsto x \cdot \left(y \cdot z - a \cdot t\right) + i \cdot \left(-1 \cdot \left(j \cdot y\right) + \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot \left(b \cdot t\right)\right) \]
      15. cancel-sign-sub-invN/A

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

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

      \[\leadsto \mathsf{fma}\left(x, y \cdot z - a \cdot t, i \cdot \color{blue}{\left(b \cdot t\right)}\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f6464.0

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

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

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

Alternative 13: 52.1% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;y \leq -4.5 \cdot 10^{-250}:\\
\;\;\;\;b \cdot \left(t \cdot i - c \cdot z\right)\\

\mathbf{elif}\;y \leq 9000000000:\\
\;\;\;\;a \cdot \mathsf{fma}\left(j, c, 0 - t \cdot x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.70000000000000015e66 or 9e9 < y

    1. Initial program 72.1%

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

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

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

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

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

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

        \[\leadsto y \cdot \left(x \cdot z + \color{blue}{\left(\mathsf{neg}\left(i \cdot j\right)\right)}\right) \]
      4. unsub-negN/A

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

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

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

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

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

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

    if -1.70000000000000015e66 < y < -4.49999999999999993e-250

    1. Initial program 68.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(c \cdot z + \color{blue}{-1 \cdot \left(i \cdot t\right)}\right)\right)\right) \]
    5. Simplified56.4%

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

    if -4.49999999999999993e-250 < y < 9e9

    1. Initial program 76.4%

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{0 - t \cdot x}\right) \]
      8. *-lowering-*.f6453.7

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

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

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

Alternative 14: 52.2% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(x \cdot z - j \cdot i\right)\\ \mathbf{if}\;y \leq -2 \cdot 10^{+66}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -3 \cdot 10^{-101}:\\ \;\;\;\;b \cdot \left(t \cdot i - c \cdot z\right)\\ \mathbf{elif}\;y \leq 3800000000:\\ \;\;\;\;c \cdot \left(a \cdot j - b \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 (* y (- (* x z) (* j i)))))
   (if (<= y -2e+66)
     t_1
     (if (<= y -3e-101)
       (* b (- (* t i) (* c z)))
       (if (<= y 3800000000.0) (* c (- (* a j) (* b z))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = y * ((x * z) - (j * i));
	double tmp;
	if (y <= -2e+66) {
		tmp = t_1;
	} else if (y <= -3e-101) {
		tmp = b * ((t * i) - (c * z));
	} else if (y <= 3800000000.0) {
		tmp = c * ((a * j) - (b * 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 = y * ((x * z) - (j * i))
    if (y <= (-2d+66)) then
        tmp = t_1
    else if (y <= (-3d-101)) then
        tmp = b * ((t * i) - (c * z))
    else if (y <= 3800000000.0d0) then
        tmp = c * ((a * j) - (b * 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 = y * ((x * z) - (j * i));
	double tmp;
	if (y <= -2e+66) {
		tmp = t_1;
	} else if (y <= -3e-101) {
		tmp = b * ((t * i) - (c * z));
	} else if (y <= 3800000000.0) {
		tmp = c * ((a * j) - (b * z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = y * ((x * z) - (j * i))
	tmp = 0
	if y <= -2e+66:
		tmp = t_1
	elif y <= -3e-101:
		tmp = b * ((t * i) - (c * z))
	elif y <= 3800000000.0:
		tmp = c * ((a * j) - (b * z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(y * Float64(Float64(x * z) - Float64(j * i)))
	tmp = 0.0
	if (y <= -2e+66)
		tmp = t_1;
	elseif (y <= -3e-101)
		tmp = Float64(b * Float64(Float64(t * i) - Float64(c * z)));
	elseif (y <= 3800000000.0)
		tmp = Float64(c * Float64(Float64(a * j) - Float64(b * z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = y * ((x * z) - (j * i));
	tmp = 0.0;
	if (y <= -2e+66)
		tmp = t_1;
	elseif (y <= -3e-101)
		tmp = b * ((t * i) - (c * z));
	elseif (y <= 3800000000.0)
		tmp = c * ((a * j) - (b * 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[(y * N[(N[(x * z), $MachinePrecision] - N[(j * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2e+66], t$95$1, If[LessEqual[y, -3e-101], N[(b * N[(N[(t * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3800000000.0], N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -3 \cdot 10^{-101}:\\
\;\;\;\;b \cdot \left(t \cdot i - c \cdot z\right)\\

\mathbf{elif}\;y \leq 3800000000:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.99999999999999989e66 or 3.8e9 < y

    1. Initial program 72.1%

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

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

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

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

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

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

        \[\leadsto y \cdot \left(x \cdot z + \color{blue}{\left(\mathsf{neg}\left(i \cdot j\right)\right)}\right) \]
      4. unsub-negN/A

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

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

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

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

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

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

    if -1.99999999999999989e66 < y < -3.0000000000000003e-101

    1. Initial program 58.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(c \cdot z + \color{blue}{-1 \cdot \left(i \cdot t\right)}\right)\right)\right) \]
    5. Simplified54.6%

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

    if -3.0000000000000003e-101 < y < 3.8e9

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

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

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

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

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

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

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

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

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

Alternative 15: 51.0% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(z \cdot y - t \cdot a\right)\\ \mathbf{if}\;x \leq -1.22 \cdot 10^{-71}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -3.9 \cdot 10^{-275}:\\ \;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\ \mathbf{elif}\;x \leq 1.02 \cdot 10^{+127}:\\ \;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* x (- (* z y) (* t a)))))
   (if (<= x -1.22e-71)
     t_1
     (if (<= x -3.9e-275)
       (* c (- (* a j) (* b z)))
       (if (<= x 1.02e+127) (* j (- (* a c) (* i y))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = x * ((z * y) - (t * a));
	double tmp;
	if (x <= -1.22e-71) {
		tmp = t_1;
	} else if (x <= -3.9e-275) {
		tmp = c * ((a * j) - (b * z));
	} else if (x <= 1.02e+127) {
		tmp = j * ((a * c) - (i * y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * ((z * y) - (t * a))
    if (x <= (-1.22d-71)) then
        tmp = t_1
    else if (x <= (-3.9d-275)) then
        tmp = c * ((a * j) - (b * z))
    else if (x <= 1.02d+127) then
        tmp = j * ((a * c) - (i * y))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = x * ((z * y) - (t * a));
	double tmp;
	if (x <= -1.22e-71) {
		tmp = t_1;
	} else if (x <= -3.9e-275) {
		tmp = c * ((a * j) - (b * z));
	} else if (x <= 1.02e+127) {
		tmp = j * ((a * c) - (i * y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = x * ((z * y) - (t * a))
	tmp = 0
	if x <= -1.22e-71:
		tmp = t_1
	elif x <= -3.9e-275:
		tmp = c * ((a * j) - (b * z))
	elif x <= 1.02e+127:
		tmp = j * ((a * c) - (i * y))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(x * Float64(Float64(z * y) - Float64(t * a)))
	tmp = 0.0
	if (x <= -1.22e-71)
		tmp = t_1;
	elseif (x <= -3.9e-275)
		tmp = Float64(c * Float64(Float64(a * j) - Float64(b * z)));
	elseif (x <= 1.02e+127)
		tmp = Float64(j * Float64(Float64(a * c) - Float64(i * y)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = x * ((z * y) - (t * a));
	tmp = 0.0;
	if (x <= -1.22e-71)
		tmp = t_1;
	elseif (x <= -3.9e-275)
		tmp = c * ((a * j) - (b * z));
	elseif (x <= 1.02e+127)
		tmp = j * ((a * c) - (i * y));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(N[(z * y), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.22e-71], t$95$1, If[LessEqual[x, -3.9e-275], N[(c * N[(N[(a * j), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.02e+127], N[(j * N[(N[(a * c), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(z \cdot y - t \cdot a\right)\\
\mathbf{if}\;x \leq -1.22 \cdot 10^{-71}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.21999999999999999e-71 or 1.02e127 < x

    1. Initial program 76.4%

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

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

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

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

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

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

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

    if -1.21999999999999999e-71 < x < -3.89999999999999973e-275

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

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

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

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

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

        \[\leadsto c \cdot \left(\color{blue}{j \cdot a} - b \cdot z\right) \]
      5. *-lowering-*.f6457.7

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

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

    if -3.89999999999999973e-275 < x < 1.02e127

    1. Initial program 65.4%

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

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

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

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

        \[\leadsto j \cdot \left(\color{blue}{a \cdot c} - i \cdot y\right) \]
      4. *-lowering-*.f6454.6

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

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

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

Alternative 16: 41.4% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;y \leq -1.36 \cdot 10^{-103}:\\
\;\;\;\;b \cdot \left(t \cdot i - c \cdot z\right)\\

\mathbf{elif}\;y \leq 420000000000:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -5.3999999999999999e70

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(b\right)}, x \cdot y\right) \]
      9. neg-sub0N/A

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

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

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

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

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

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

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

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

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

    if -5.3999999999999999e70 < y < -1.36000000000000006e-103

    1. Initial program 58.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(c \cdot z + \color{blue}{-1 \cdot \left(i \cdot t\right)}\right)\right)\right) \]
    5. Simplified54.6%

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

    if -1.36000000000000006e-103 < y < 4.2e11

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

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

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

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

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

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

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

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

    if 4.2e11 < y

    1. Initial program 76.3%

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

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

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

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

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

        \[\leadsto j \cdot \left(a \cdot c + \color{blue}{\left(\mathsf{neg}\left(i \cdot y\right)\right)}\right) \]
      3. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.4 \cdot 10^{+70}:\\ \;\;\;\;z \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq -1.36 \cdot 10^{-103}:\\ \;\;\;\;b \cdot \left(t \cdot i - c \cdot z\right)\\ \mathbf{elif}\;y \leq 420000000000:\\ \;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;0 - j \cdot \left(i \cdot y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 29.6% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;y \leq -2.1 \cdot 10^{-293}:\\
\;\;\;\;i \cdot \left(t \cdot b\right)\\

\mathbf{elif}\;y \leq 3600000000:\\
\;\;\;\;j \cdot \left(a \cdot c\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.19999999999999972e50

    1. Initial program 66.9%

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(b\right)}, x \cdot y\right) \]
      9. neg-sub0N/A

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

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

        \[\leadsto z \cdot \mathsf{fma}\left(c, 0 - b, \color{blue}{y \cdot x}\right) \]
      12. *-lowering-*.f6457.0

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

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

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

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

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

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

    if -7.19999999999999972e50 < y < -2.10000000000000005e-293

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(c \cdot z + \color{blue}{-1 \cdot \left(i \cdot t\right)}\right)\right)\right) \]
    5. Simplified53.4%

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

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

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

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

        \[\leadsto b \cdot \color{blue}{\left(t \cdot i\right)} \]
      2. associate-*r*N/A

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

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

        \[\leadsto \color{blue}{\left(t \cdot b\right)} \cdot i \]
      5. *-lowering-*.f6436.1

        \[\leadsto \color{blue}{\left(t \cdot b\right)} \cdot i \]
    10. Applied egg-rr36.1%

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

    if -2.10000000000000005e-293 < y < 3.6e9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.6e9 < y

    1. Initial program 76.3%

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

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

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

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

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

        \[\leadsto j \cdot \left(a \cdot c + \color{blue}{\left(\mathsf{neg}\left(i \cdot y\right)\right)}\right) \]
      3. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 51.7% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -1.40000000000000008e87 or 1.75000000000000003e-49 < c

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

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

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

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

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

        \[\leadsto c \cdot \left(\color{blue}{j \cdot a} - b \cdot z\right) \]
      5. *-lowering-*.f6460.4

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

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

    if -1.40000000000000008e87 < c < 1.75000000000000003e-49

    1. Initial program 81.6%

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

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

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

      \[\leadsto i \cdot \mathsf{fma}\left(b, t, \mathsf{neg}\left(\color{blue}{j \cdot y}\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f6451.0

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

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

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

Alternative 19: 50.8% accurate, 2.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.3999999999999999e91 or 2.94999999999999983e-74 < b

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{neg}\left(\left(b \cdot \left(c \cdot z\right) + \color{blue}{\left(\mathsf{neg}\left(b \cdot \left(i \cdot t\right)\right)\right)}\right)\right) \]
      9. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{neg}\left(\left(b \cdot \left(c \cdot z\right) + \color{blue}{b \cdot \left(\mathsf{neg}\left(i \cdot t\right)\right)}\right)\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(\left(b \cdot \left(c \cdot z\right) + b \cdot \color{blue}{\left(-1 \cdot \left(i \cdot t\right)\right)}\right)\right) \]
      11. distribute-lft-inN/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{b \cdot \left(c \cdot z + -1 \cdot \left(i \cdot t\right)\right)}\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(b \cdot \left(c \cdot z + \color{blue}{\left(\mathsf{neg}\left(i \cdot t\right)\right)}\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{neg}\left(b \cdot \color{blue}{\left(c \cdot z - i \cdot t\right)}\right) \]
      14. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{b \cdot \left(\mathsf{neg}\left(\left(c \cdot z - i \cdot t\right)\right)\right)} \]
      15. mul-1-negN/A

        \[\leadsto b \cdot \color{blue}{\left(-1 \cdot \left(c \cdot z - i \cdot t\right)\right)} \]
      16. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{b \cdot \left(-1 \cdot \left(c \cdot z - i \cdot t\right)\right)} \]
      17. mul-1-negN/A

        \[\leadsto b \cdot \color{blue}{\left(\mathsf{neg}\left(\left(c \cdot z - i \cdot t\right)\right)\right)} \]
      18. sub-negN/A

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\color{blue}{\left(c \cdot z + \left(\mathsf{neg}\left(i \cdot t\right)\right)\right)}\right)\right) \]
      19. mul-1-negN/A

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(c \cdot z + \color{blue}{-1 \cdot \left(i \cdot t\right)}\right)\right)\right) \]
    5. Simplified61.3%

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]

    if -1.3999999999999999e91 < b < 2.94999999999999983e-74

    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 j around inf

      \[\leadsto \color{blue}{j \cdot \left(a \cdot c - i \cdot y\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{j \cdot \left(a \cdot c - i \cdot y\right)} \]
      2. --lowering--.f64N/A

        \[\leadsto j \cdot \color{blue}{\left(a \cdot c - i \cdot y\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto j \cdot \left(\color{blue}{a \cdot c} - i \cdot y\right) \]
      4. *-lowering-*.f6451.2

        \[\leadsto j \cdot \left(a \cdot c - \color{blue}{i \cdot y}\right) \]
    5. Simplified51.2%

      \[\leadsto \color{blue}{j \cdot \left(a \cdot c - i \cdot y\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification55.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.4 \cdot 10^{+91}:\\ \;\;\;\;b \cdot \left(t \cdot i - c \cdot z\right)\\ \mathbf{elif}\;b \leq 2.95 \cdot 10^{-74}:\\ \;\;\;\;j \cdot \left(a \cdot c - i \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(t \cdot i - c \cdot z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 41.1% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+63}:\\ \;\;\;\;z \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+164}:\\ \;\;\;\;b \cdot \left(t \cdot i - c \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0 - i\right) \cdot \left(j \cdot y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= y -7e+63)
   (* z (* x y))
   (if (<= y 9.5e+164) (* b (- (* t i) (* c z))) (* (- 0.0 i) (* j y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (y <= -7e+63) {
		tmp = z * (x * y);
	} else if (y <= 9.5e+164) {
		tmp = b * ((t * i) - (c * z));
	} else {
		tmp = (0.0 - i) * (j * y);
	}
	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 <= (-7d+63)) then
        tmp = z * (x * y)
    else if (y <= 9.5d+164) then
        tmp = b * ((t * i) - (c * z))
    else
        tmp = (0.0d0 - i) * (j * y)
    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 <= -7e+63) {
		tmp = z * (x * y);
	} else if (y <= 9.5e+164) {
		tmp = b * ((t * i) - (c * z));
	} else {
		tmp = (0.0 - i) * (j * y);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if y <= -7e+63:
		tmp = z * (x * y)
	elif y <= 9.5e+164:
		tmp = b * ((t * i) - (c * z))
	else:
		tmp = (0.0 - i) * (j * y)
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (y <= -7e+63)
		tmp = Float64(z * Float64(x * y));
	elseif (y <= 9.5e+164)
		tmp = Float64(b * Float64(Float64(t * i) - Float64(c * z)));
	else
		tmp = Float64(Float64(0.0 - i) * Float64(j * y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (y <= -7e+63)
		tmp = z * (x * y);
	elseif (y <= 9.5e+164)
		tmp = b * ((t * i) - (c * z));
	else
		tmp = (0.0 - i) * (j * y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -7e+63], N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.5e+164], N[(b * N[(N[(t * i), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.0 - i), $MachinePrecision] * N[(j * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+63}:\\
\;\;\;\;z \cdot \left(x \cdot y\right)\\

\mathbf{elif}\;y \leq 9.5 \cdot 10^{+164}:\\
\;\;\;\;b \cdot \left(t \cdot i - c \cdot z\right)\\

\mathbf{else}:\\
\;\;\;\;\left(0 - i\right) \cdot \left(j \cdot y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.00000000000000059e63

    1. Initial program 66.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 z around inf

      \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
      2. sub-negN/A

        \[\leadsto z \cdot \color{blue}{\left(x \cdot y + \left(\mathsf{neg}\left(b \cdot c\right)\right)\right)} \]
      3. mul-1-negN/A

        \[\leadsto z \cdot \left(x \cdot y + \color{blue}{-1 \cdot \left(b \cdot c\right)}\right) \]
      4. +-commutativeN/A

        \[\leadsto z \cdot \color{blue}{\left(-1 \cdot \left(b \cdot c\right) + x \cdot y\right)} \]
      5. associate-*r*N/A

        \[\leadsto z \cdot \left(\color{blue}{\left(-1 \cdot b\right) \cdot c} + x \cdot y\right) \]
      6. *-commutativeN/A

        \[\leadsto z \cdot \left(\color{blue}{c \cdot \left(-1 \cdot b\right)} + x \cdot y\right) \]
      7. accelerator-lowering-fma.f64N/A

        \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(c, -1 \cdot b, x \cdot y\right)} \]
      8. neg-mul-1N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(b\right)}, x \cdot y\right) \]
      9. neg-sub0N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{0 - b}, x \cdot y\right) \]
      10. --lowering--.f64N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{0 - b}, x \cdot y\right) \]
      11. *-commutativeN/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, 0 - b, \color{blue}{y \cdot x}\right) \]
      12. *-lowering-*.f6456.3

        \[\leadsto z \cdot \mathsf{fma}\left(c, 0 - b, \color{blue}{y \cdot x}\right) \]
    5. Simplified56.3%

      \[\leadsto \color{blue}{z \cdot \mathsf{fma}\left(c, 0 - b, y \cdot x\right)} \]
    6. Taylor expanded in c around 0

      \[\leadsto z \cdot \color{blue}{\left(x \cdot y\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto z \cdot \color{blue}{\left(y \cdot x\right)} \]
      2. *-lowering-*.f6449.4

        \[\leadsto z \cdot \color{blue}{\left(y \cdot x\right)} \]
    8. Simplified49.4%

      \[\leadsto z \cdot \color{blue}{\left(y \cdot x\right)} \]

    if -7.00000000000000059e63 < y < 9.49999999999999976e164

    1. Initial program 73.8%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto b \cdot \color{blue}{\left(i \cdot t + \left(\mathsf{neg}\left(c \cdot z\right)\right)\right)} \]
      2. distribute-lft-inN/A

        \[\leadsto \color{blue}{b \cdot \left(i \cdot t\right) + b \cdot \left(\mathsf{neg}\left(c \cdot z\right)\right)} \]
      3. remove-double-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(i \cdot t\right)\right)\right)\right)\right)} + b \cdot \left(\mathsf{neg}\left(c \cdot z\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{-1 \cdot \left(b \cdot \left(i \cdot t\right)\right)}\right)\right) + b \cdot \left(\mathsf{neg}\left(c \cdot z\right)\right) \]
      5. distribute-rgt-neg-inN/A

        \[\leadsto \left(\mathsf{neg}\left(-1 \cdot \left(b \cdot \left(i \cdot t\right)\right)\right)\right) + \color{blue}{\left(\mathsf{neg}\left(b \cdot \left(c \cdot z\right)\right)\right)} \]
      6. distribute-neg-inN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\left(-1 \cdot \left(b \cdot \left(i \cdot t\right)\right) + b \cdot \left(c \cdot z\right)\right)\right)} \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{\left(b \cdot \left(c \cdot z\right) + -1 \cdot \left(b \cdot \left(i \cdot t\right)\right)\right)}\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(\left(b \cdot \left(c \cdot z\right) + \color{blue}{\left(\mathsf{neg}\left(b \cdot \left(i \cdot t\right)\right)\right)}\right)\right) \]
      9. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{neg}\left(\left(b \cdot \left(c \cdot z\right) + \color{blue}{b \cdot \left(\mathsf{neg}\left(i \cdot t\right)\right)}\right)\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(\left(b \cdot \left(c \cdot z\right) + b \cdot \color{blue}{\left(-1 \cdot \left(i \cdot t\right)\right)}\right)\right) \]
      11. distribute-lft-inN/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{b \cdot \left(c \cdot z + -1 \cdot \left(i \cdot t\right)\right)}\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(b \cdot \left(c \cdot z + \color{blue}{\left(\mathsf{neg}\left(i \cdot t\right)\right)}\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{neg}\left(b \cdot \color{blue}{\left(c \cdot z - i \cdot t\right)}\right) \]
      14. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{b \cdot \left(\mathsf{neg}\left(\left(c \cdot z - i \cdot t\right)\right)\right)} \]
      15. mul-1-negN/A

        \[\leadsto b \cdot \color{blue}{\left(-1 \cdot \left(c \cdot z - i \cdot t\right)\right)} \]
      16. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{b \cdot \left(-1 \cdot \left(c \cdot z - i \cdot t\right)\right)} \]
      17. mul-1-negN/A

        \[\leadsto b \cdot \color{blue}{\left(\mathsf{neg}\left(\left(c \cdot z - i \cdot t\right)\right)\right)} \]
      18. sub-negN/A

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\color{blue}{\left(c \cdot z + \left(\mathsf{neg}\left(i \cdot t\right)\right)\right)}\right)\right) \]
      19. mul-1-negN/A

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(c \cdot z + \color{blue}{-1 \cdot \left(i \cdot t\right)}\right)\right)\right) \]
    5. Simplified45.1%

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]

    if 9.49999999999999976e164 < y

    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 y around 0

      \[\leadsto \color{blue}{\left(-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + \left(a \cdot \left(c \cdot j\right) + y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)\right)\right) - b \cdot \left(c \cdot z - i \cdot t\right)} \]
    4. Simplified86.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, \mathsf{fma}\left(j, c, 0 - t \cdot x\right), \mathsf{fma}\left(b, i \cdot t - c \cdot z, y \cdot \mathsf{fma}\left(j, 0 - i, z \cdot x\right)\right)\right)} \]
    5. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
      2. +-commutativeN/A

        \[\leadsto y \cdot \color{blue}{\left(x \cdot z + -1 \cdot \left(i \cdot j\right)\right)} \]
      3. mul-1-negN/A

        \[\leadsto y \cdot \left(x \cdot z + \color{blue}{\left(\mathsf{neg}\left(i \cdot j\right)\right)}\right) \]
      4. unsub-negN/A

        \[\leadsto y \cdot \color{blue}{\left(x \cdot z - i \cdot j\right)} \]
      5. --lowering--.f64N/A

        \[\leadsto y \cdot \color{blue}{\left(x \cdot z - i \cdot j\right)} \]
      6. *-commutativeN/A

        \[\leadsto y \cdot \left(\color{blue}{z \cdot x} - i \cdot j\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto y \cdot \left(\color{blue}{z \cdot x} - i \cdot j\right) \]
      8. *-lowering-*.f6486.5

        \[\leadsto y \cdot \left(z \cdot x - \color{blue}{i \cdot j}\right) \]
    7. Simplified86.5%

      \[\leadsto \color{blue}{y \cdot \left(z \cdot x - i \cdot j\right)} \]
    8. Taylor expanded in z around 0

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot y\right)\right)} \]
    9. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(i \cdot \left(j \cdot y\right)\right)} \]
      2. neg-sub0N/A

        \[\leadsto \color{blue}{0 - i \cdot \left(j \cdot y\right)} \]
      3. --lowering--.f64N/A

        \[\leadsto \color{blue}{0 - i \cdot \left(j \cdot y\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto 0 - \color{blue}{i \cdot \left(j \cdot y\right)} \]
      5. *-lowering-*.f6461.6

        \[\leadsto 0 - i \cdot \color{blue}{\left(j \cdot y\right)} \]
    10. Simplified61.6%

      \[\leadsto \color{blue}{0 - i \cdot \left(j \cdot y\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification48.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+63}:\\ \;\;\;\;z \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+164}:\\ \;\;\;\;b \cdot \left(t \cdot i - c \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0 - i\right) \cdot \left(j \cdot y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 28.6% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.52 \cdot 10^{+52}:\\ \;\;\;\;z \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq -2.15 \cdot 10^{-292}:\\ \;\;\;\;i \cdot \left(t \cdot b\right)\\ \mathbf{elif}\;y \leq 560000000:\\ \;\;\;\;j \cdot \left(a \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z \cdot y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= y -1.52e+52)
   (* z (* x y))
   (if (<= y -2.15e-292)
     (* i (* t b))
     (if (<= y 560000000.0) (* j (* a c)) (* x (* z y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (y <= -1.52e+52) {
		tmp = z * (x * y);
	} else if (y <= -2.15e-292) {
		tmp = i * (t * b);
	} else if (y <= 560000000.0) {
		tmp = j * (a * c);
	} else {
		tmp = x * (z * y);
	}
	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 <= (-1.52d+52)) then
        tmp = z * (x * y)
    else if (y <= (-2.15d-292)) then
        tmp = i * (t * b)
    else if (y <= 560000000.0d0) then
        tmp = j * (a * c)
    else
        tmp = x * (z * y)
    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 <= -1.52e+52) {
		tmp = z * (x * y);
	} else if (y <= -2.15e-292) {
		tmp = i * (t * b);
	} else if (y <= 560000000.0) {
		tmp = j * (a * c);
	} else {
		tmp = x * (z * y);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if y <= -1.52e+52:
		tmp = z * (x * y)
	elif y <= -2.15e-292:
		tmp = i * (t * b)
	elif y <= 560000000.0:
		tmp = j * (a * c)
	else:
		tmp = x * (z * y)
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (y <= -1.52e+52)
		tmp = Float64(z * Float64(x * y));
	elseif (y <= -2.15e-292)
		tmp = Float64(i * Float64(t * b));
	elseif (y <= 560000000.0)
		tmp = Float64(j * Float64(a * c));
	else
		tmp = Float64(x * Float64(z * y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (y <= -1.52e+52)
		tmp = z * (x * y);
	elseif (y <= -2.15e-292)
		tmp = i * (t * b);
	elseif (y <= 560000000.0)
		tmp = j * (a * c);
	else
		tmp = x * (z * y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -1.52e+52], N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.15e-292], N[(i * N[(t * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 560000000.0], N[(j * N[(a * c), $MachinePrecision]), $MachinePrecision], N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.52 \cdot 10^{+52}:\\
\;\;\;\;z \cdot \left(x \cdot y\right)\\

\mathbf{elif}\;y \leq -2.15 \cdot 10^{-292}:\\
\;\;\;\;i \cdot \left(t \cdot b\right)\\

\mathbf{elif}\;y \leq 560000000:\\
\;\;\;\;j \cdot \left(a \cdot c\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.5199999999999999e52

    1. Initial program 66.9%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
      2. sub-negN/A

        \[\leadsto z \cdot \color{blue}{\left(x \cdot y + \left(\mathsf{neg}\left(b \cdot c\right)\right)\right)} \]
      3. mul-1-negN/A

        \[\leadsto z \cdot \left(x \cdot y + \color{blue}{-1 \cdot \left(b \cdot c\right)}\right) \]
      4. +-commutativeN/A

        \[\leadsto z \cdot \color{blue}{\left(-1 \cdot \left(b \cdot c\right) + x \cdot y\right)} \]
      5. associate-*r*N/A

        \[\leadsto z \cdot \left(\color{blue}{\left(-1 \cdot b\right) \cdot c} + x \cdot y\right) \]
      6. *-commutativeN/A

        \[\leadsto z \cdot \left(\color{blue}{c \cdot \left(-1 \cdot b\right)} + x \cdot y\right) \]
      7. accelerator-lowering-fma.f64N/A

        \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(c, -1 \cdot b, x \cdot y\right)} \]
      8. neg-mul-1N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(b\right)}, x \cdot y\right) \]
      9. neg-sub0N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{0 - b}, x \cdot y\right) \]
      10. --lowering--.f64N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{0 - b}, x \cdot y\right) \]
      11. *-commutativeN/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, 0 - b, \color{blue}{y \cdot x}\right) \]
      12. *-lowering-*.f6457.0

        \[\leadsto z \cdot \mathsf{fma}\left(c, 0 - b, \color{blue}{y \cdot x}\right) \]
    5. Simplified57.0%

      \[\leadsto \color{blue}{z \cdot \mathsf{fma}\left(c, 0 - b, y \cdot x\right)} \]
    6. Taylor expanded in c around 0

      \[\leadsto z \cdot \color{blue}{\left(x \cdot y\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto z \cdot \color{blue}{\left(y \cdot x\right)} \]
      2. *-lowering-*.f6447.0

        \[\leadsto z \cdot \color{blue}{\left(y \cdot x\right)} \]
    8. Simplified47.0%

      \[\leadsto z \cdot \color{blue}{\left(y \cdot x\right)} \]

    if -1.5199999999999999e52 < y < -2.15e-292

    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 b around inf

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto b \cdot \color{blue}{\left(i \cdot t + \left(\mathsf{neg}\left(c \cdot z\right)\right)\right)} \]
      2. distribute-lft-inN/A

        \[\leadsto \color{blue}{b \cdot \left(i \cdot t\right) + b \cdot \left(\mathsf{neg}\left(c \cdot z\right)\right)} \]
      3. remove-double-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(i \cdot t\right)\right)\right)\right)\right)} + b \cdot \left(\mathsf{neg}\left(c \cdot z\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{-1 \cdot \left(b \cdot \left(i \cdot t\right)\right)}\right)\right) + b \cdot \left(\mathsf{neg}\left(c \cdot z\right)\right) \]
      5. distribute-rgt-neg-inN/A

        \[\leadsto \left(\mathsf{neg}\left(-1 \cdot \left(b \cdot \left(i \cdot t\right)\right)\right)\right) + \color{blue}{\left(\mathsf{neg}\left(b \cdot \left(c \cdot z\right)\right)\right)} \]
      6. distribute-neg-inN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\left(-1 \cdot \left(b \cdot \left(i \cdot t\right)\right) + b \cdot \left(c \cdot z\right)\right)\right)} \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{\left(b \cdot \left(c \cdot z\right) + -1 \cdot \left(b \cdot \left(i \cdot t\right)\right)\right)}\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(\left(b \cdot \left(c \cdot z\right) + \color{blue}{\left(\mathsf{neg}\left(b \cdot \left(i \cdot t\right)\right)\right)}\right)\right) \]
      9. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{neg}\left(\left(b \cdot \left(c \cdot z\right) + \color{blue}{b \cdot \left(\mathsf{neg}\left(i \cdot t\right)\right)}\right)\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(\left(b \cdot \left(c \cdot z\right) + b \cdot \color{blue}{\left(-1 \cdot \left(i \cdot t\right)\right)}\right)\right) \]
      11. distribute-lft-inN/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{b \cdot \left(c \cdot z + -1 \cdot \left(i \cdot t\right)\right)}\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(b \cdot \left(c \cdot z + \color{blue}{\left(\mathsf{neg}\left(i \cdot t\right)\right)}\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{neg}\left(b \cdot \color{blue}{\left(c \cdot z - i \cdot t\right)}\right) \]
      14. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{b \cdot \left(\mathsf{neg}\left(\left(c \cdot z - i \cdot t\right)\right)\right)} \]
      15. mul-1-negN/A

        \[\leadsto b \cdot \color{blue}{\left(-1 \cdot \left(c \cdot z - i \cdot t\right)\right)} \]
      16. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{b \cdot \left(-1 \cdot \left(c \cdot z - i \cdot t\right)\right)} \]
      17. mul-1-negN/A

        \[\leadsto b \cdot \color{blue}{\left(\mathsf{neg}\left(\left(c \cdot z - i \cdot t\right)\right)\right)} \]
      18. sub-negN/A

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\color{blue}{\left(c \cdot z + \left(\mathsf{neg}\left(i \cdot t\right)\right)\right)}\right)\right) \]
      19. mul-1-negN/A

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(c \cdot z + \color{blue}{-1 \cdot \left(i \cdot t\right)}\right)\right)\right) \]
    5. Simplified53.4%

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    6. Taylor expanded in i around inf

      \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f6433.2

        \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} \]
    8. Simplified33.2%

      \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto b \cdot \color{blue}{\left(t \cdot i\right)} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{\left(b \cdot t\right) \cdot i} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(b \cdot t\right) \cdot i} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{\left(t \cdot b\right)} \cdot i \]
      5. *-lowering-*.f6436.1

        \[\leadsto \color{blue}{\left(t \cdot b\right)} \cdot i \]
    10. Applied egg-rr36.1%

      \[\leadsto \color{blue}{\left(t \cdot b\right) \cdot i} \]

    if -2.15e-292 < y < 5.6e8

    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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
      2. +-commutativeN/A

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto a \cdot \color{blue}{\mathsf{fma}\left(j, c, -1 \cdot \left(t \cdot x\right)\right)} \]
      5. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. neg-sub0N/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{0 - t \cdot x}\right) \]
      7. --lowering--.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{0 - t \cdot x}\right) \]
      8. *-lowering-*.f6454.0

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, 0 - \color{blue}{t \cdot x}\right) \]
    5. Simplified54.0%

      \[\leadsto \color{blue}{a \cdot \mathsf{fma}\left(j, c, 0 - t \cdot x\right)} \]
    6. Taylor expanded in j around inf

      \[\leadsto \color{blue}{a \cdot \left(c \cdot j\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(a \cdot c\right) \cdot j} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(a \cdot c\right) \cdot j} \]
      3. *-commutativeN/A

        \[\leadsto \color{blue}{\left(c \cdot a\right)} \cdot j \]
      4. *-lowering-*.f6436.8

        \[\leadsto \color{blue}{\left(c \cdot a\right)} \cdot j \]
    8. Simplified36.8%

      \[\leadsto \color{blue}{\left(c \cdot a\right) \cdot j} \]

    if 5.6e8 < y

    1. Initial program 76.3%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
      2. sub-negN/A

        \[\leadsto z \cdot \color{blue}{\left(x \cdot y + \left(\mathsf{neg}\left(b \cdot c\right)\right)\right)} \]
      3. mul-1-negN/A

        \[\leadsto z \cdot \left(x \cdot y + \color{blue}{-1 \cdot \left(b \cdot c\right)}\right) \]
      4. +-commutativeN/A

        \[\leadsto z \cdot \color{blue}{\left(-1 \cdot \left(b \cdot c\right) + x \cdot y\right)} \]
      5. associate-*r*N/A

        \[\leadsto z \cdot \left(\color{blue}{\left(-1 \cdot b\right) \cdot c} + x \cdot y\right) \]
      6. *-commutativeN/A

        \[\leadsto z \cdot \left(\color{blue}{c \cdot \left(-1 \cdot b\right)} + x \cdot y\right) \]
      7. accelerator-lowering-fma.f64N/A

        \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(c, -1 \cdot b, x \cdot y\right)} \]
      8. neg-mul-1N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(b\right)}, x \cdot y\right) \]
      9. neg-sub0N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{0 - b}, x \cdot y\right) \]
      10. --lowering--.f64N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{0 - b}, x \cdot y\right) \]
      11. *-commutativeN/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, 0 - b, \color{blue}{y \cdot x}\right) \]
      12. *-lowering-*.f6446.9

        \[\leadsto z \cdot \mathsf{fma}\left(c, 0 - b, \color{blue}{y \cdot x}\right) \]
    5. Simplified46.9%

      \[\leadsto \color{blue}{z \cdot \mathsf{fma}\left(c, 0 - b, y \cdot x\right)} \]
    6. Taylor expanded in c around 0

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(y \cdot z\right)} \]
      2. *-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
      3. *-lowering-*.f6437.1

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
    8. Simplified37.1%

      \[\leadsto \color{blue}{x \cdot \left(z \cdot y\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification39.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.52 \cdot 10^{+52}:\\ \;\;\;\;z \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq -2.15 \cdot 10^{-292}:\\ \;\;\;\;i \cdot \left(t \cdot b\right)\\ \mathbf{elif}\;y \leq 560000000:\\ \;\;\;\;j \cdot \left(a \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z \cdot y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 28.3% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{+49}:\\ \;\;\;\;z \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq 10^{-297}:\\ \;\;\;\;t \cdot \left(b \cdot i\right)\\ \mathbf{elif}\;y \leq 2050000000:\\ \;\;\;\;j \cdot \left(a \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z \cdot y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= y -4.4e+49)
   (* z (* x y))
   (if (<= y 1e-297)
     (* t (* b i))
     (if (<= y 2050000000.0) (* j (* a c)) (* x (* z y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (y <= -4.4e+49) {
		tmp = z * (x * y);
	} else if (y <= 1e-297) {
		tmp = t * (b * i);
	} else if (y <= 2050000000.0) {
		tmp = j * (a * c);
	} else {
		tmp = x * (z * y);
	}
	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 <= (-4.4d+49)) then
        tmp = z * (x * y)
    else if (y <= 1d-297) then
        tmp = t * (b * i)
    else if (y <= 2050000000.0d0) then
        tmp = j * (a * c)
    else
        tmp = x * (z * y)
    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 <= -4.4e+49) {
		tmp = z * (x * y);
	} else if (y <= 1e-297) {
		tmp = t * (b * i);
	} else if (y <= 2050000000.0) {
		tmp = j * (a * c);
	} else {
		tmp = x * (z * y);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if y <= -4.4e+49:
		tmp = z * (x * y)
	elif y <= 1e-297:
		tmp = t * (b * i)
	elif y <= 2050000000.0:
		tmp = j * (a * c)
	else:
		tmp = x * (z * y)
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (y <= -4.4e+49)
		tmp = Float64(z * Float64(x * y));
	elseif (y <= 1e-297)
		tmp = Float64(t * Float64(b * i));
	elseif (y <= 2050000000.0)
		tmp = Float64(j * Float64(a * c));
	else
		tmp = Float64(x * Float64(z * y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (y <= -4.4e+49)
		tmp = z * (x * y);
	elseif (y <= 1e-297)
		tmp = t * (b * i);
	elseif (y <= 2050000000.0)
		tmp = j * (a * c);
	else
		tmp = x * (z * y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -4.4e+49], N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e-297], N[(t * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2050000000.0], N[(j * N[(a * c), $MachinePrecision]), $MachinePrecision], N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+49}:\\
\;\;\;\;z \cdot \left(x \cdot y\right)\\

\mathbf{elif}\;y \leq 10^{-297}:\\
\;\;\;\;t \cdot \left(b \cdot i\right)\\

\mathbf{elif}\;y \leq 2050000000:\\
\;\;\;\;j \cdot \left(a \cdot c\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.4000000000000001e49

    1. Initial program 66.9%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
      2. sub-negN/A

        \[\leadsto z \cdot \color{blue}{\left(x \cdot y + \left(\mathsf{neg}\left(b \cdot c\right)\right)\right)} \]
      3. mul-1-negN/A

        \[\leadsto z \cdot \left(x \cdot y + \color{blue}{-1 \cdot \left(b \cdot c\right)}\right) \]
      4. +-commutativeN/A

        \[\leadsto z \cdot \color{blue}{\left(-1 \cdot \left(b \cdot c\right) + x \cdot y\right)} \]
      5. associate-*r*N/A

        \[\leadsto z \cdot \left(\color{blue}{\left(-1 \cdot b\right) \cdot c} + x \cdot y\right) \]
      6. *-commutativeN/A

        \[\leadsto z \cdot \left(\color{blue}{c \cdot \left(-1 \cdot b\right)} + x \cdot y\right) \]
      7. accelerator-lowering-fma.f64N/A

        \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(c, -1 \cdot b, x \cdot y\right)} \]
      8. neg-mul-1N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(b\right)}, x \cdot y\right) \]
      9. neg-sub0N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{0 - b}, x \cdot y\right) \]
      10. --lowering--.f64N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{0 - b}, x \cdot y\right) \]
      11. *-commutativeN/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, 0 - b, \color{blue}{y \cdot x}\right) \]
      12. *-lowering-*.f6457.0

        \[\leadsto z \cdot \mathsf{fma}\left(c, 0 - b, \color{blue}{y \cdot x}\right) \]
    5. Simplified57.0%

      \[\leadsto \color{blue}{z \cdot \mathsf{fma}\left(c, 0 - b, y \cdot x\right)} \]
    6. Taylor expanded in c around 0

      \[\leadsto z \cdot \color{blue}{\left(x \cdot y\right)} \]
    7. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto z \cdot \color{blue}{\left(y \cdot x\right)} \]
      2. *-lowering-*.f6447.0

        \[\leadsto z \cdot \color{blue}{\left(y \cdot x\right)} \]
    8. Simplified47.0%

      \[\leadsto z \cdot \color{blue}{\left(y \cdot x\right)} \]

    if -4.4000000000000001e49 < y < 1.00000000000000004e-297

    1. Initial program 67.5%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Add Preprocessing
    3. Taylor expanded in b around inf

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto b \cdot \color{blue}{\left(i \cdot t + \left(\mathsf{neg}\left(c \cdot z\right)\right)\right)} \]
      2. distribute-lft-inN/A

        \[\leadsto \color{blue}{b \cdot \left(i \cdot t\right) + b \cdot \left(\mathsf{neg}\left(c \cdot z\right)\right)} \]
      3. remove-double-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(i \cdot t\right)\right)\right)\right)\right)} + b \cdot \left(\mathsf{neg}\left(c \cdot z\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{-1 \cdot \left(b \cdot \left(i \cdot t\right)\right)}\right)\right) + b \cdot \left(\mathsf{neg}\left(c \cdot z\right)\right) \]
      5. distribute-rgt-neg-inN/A

        \[\leadsto \left(\mathsf{neg}\left(-1 \cdot \left(b \cdot \left(i \cdot t\right)\right)\right)\right) + \color{blue}{\left(\mathsf{neg}\left(b \cdot \left(c \cdot z\right)\right)\right)} \]
      6. distribute-neg-inN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\left(-1 \cdot \left(b \cdot \left(i \cdot t\right)\right) + b \cdot \left(c \cdot z\right)\right)\right)} \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{\left(b \cdot \left(c \cdot z\right) + -1 \cdot \left(b \cdot \left(i \cdot t\right)\right)\right)}\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(\left(b \cdot \left(c \cdot z\right) + \color{blue}{\left(\mathsf{neg}\left(b \cdot \left(i \cdot t\right)\right)\right)}\right)\right) \]
      9. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{neg}\left(\left(b \cdot \left(c \cdot z\right) + \color{blue}{b \cdot \left(\mathsf{neg}\left(i \cdot t\right)\right)}\right)\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(\left(b \cdot \left(c \cdot z\right) + b \cdot \color{blue}{\left(-1 \cdot \left(i \cdot t\right)\right)}\right)\right) \]
      11. distribute-lft-inN/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{b \cdot \left(c \cdot z + -1 \cdot \left(i \cdot t\right)\right)}\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(b \cdot \left(c \cdot z + \color{blue}{\left(\mathsf{neg}\left(i \cdot t\right)\right)}\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{neg}\left(b \cdot \color{blue}{\left(c \cdot z - i \cdot t\right)}\right) \]
      14. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{b \cdot \left(\mathsf{neg}\left(\left(c \cdot z - i \cdot t\right)\right)\right)} \]
      15. mul-1-negN/A

        \[\leadsto b \cdot \color{blue}{\left(-1 \cdot \left(c \cdot z - i \cdot t\right)\right)} \]
      16. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{b \cdot \left(-1 \cdot \left(c \cdot z - i \cdot t\right)\right)} \]
      17. mul-1-negN/A

        \[\leadsto b \cdot \color{blue}{\left(\mathsf{neg}\left(\left(c \cdot z - i \cdot t\right)\right)\right)} \]
      18. sub-negN/A

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\color{blue}{\left(c \cdot z + \left(\mathsf{neg}\left(i \cdot t\right)\right)\right)}\right)\right) \]
      19. mul-1-negN/A

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(c \cdot z + \color{blue}{-1 \cdot \left(i \cdot t\right)}\right)\right)\right) \]
    5. Simplified53.2%

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    6. Taylor expanded in i around inf

      \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f6434.3

        \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} \]
    8. Simplified34.3%

      \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(b \cdot i\right) \cdot t} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(b \cdot i\right) \cdot t} \]
      3. *-commutativeN/A

        \[\leadsto \color{blue}{\left(i \cdot b\right)} \cdot t \]
      4. *-lowering-*.f6435.5

        \[\leadsto \color{blue}{\left(i \cdot b\right)} \cdot t \]
    10. Applied egg-rr35.5%

      \[\leadsto \color{blue}{\left(i \cdot b\right) \cdot t} \]

    if 1.00000000000000004e-297 < y < 2.05e9

    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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
      2. +-commutativeN/A

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto a \cdot \color{blue}{\mathsf{fma}\left(j, c, -1 \cdot \left(t \cdot x\right)\right)} \]
      5. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. neg-sub0N/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{0 - t \cdot x}\right) \]
      7. --lowering--.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{0 - t \cdot x}\right) \]
      8. *-lowering-*.f6454.1

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, 0 - \color{blue}{t \cdot x}\right) \]
    5. Simplified54.1%

      \[\leadsto \color{blue}{a \cdot \mathsf{fma}\left(j, c, 0 - t \cdot x\right)} \]
    6. Taylor expanded in j around inf

      \[\leadsto \color{blue}{a \cdot \left(c \cdot j\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \color{blue}{\left(a \cdot c\right) \cdot j} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{\left(a \cdot c\right) \cdot j} \]
      3. *-commutativeN/A

        \[\leadsto \color{blue}{\left(c \cdot a\right)} \cdot j \]
      4. *-lowering-*.f6436.9

        \[\leadsto \color{blue}{\left(c \cdot a\right)} \cdot j \]
    8. Simplified36.9%

      \[\leadsto \color{blue}{\left(c \cdot a\right) \cdot j} \]

    if 2.05e9 < y

    1. Initial program 76.3%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
      2. sub-negN/A

        \[\leadsto z \cdot \color{blue}{\left(x \cdot y + \left(\mathsf{neg}\left(b \cdot c\right)\right)\right)} \]
      3. mul-1-negN/A

        \[\leadsto z \cdot \left(x \cdot y + \color{blue}{-1 \cdot \left(b \cdot c\right)}\right) \]
      4. +-commutativeN/A

        \[\leadsto z \cdot \color{blue}{\left(-1 \cdot \left(b \cdot c\right) + x \cdot y\right)} \]
      5. associate-*r*N/A

        \[\leadsto z \cdot \left(\color{blue}{\left(-1 \cdot b\right) \cdot c} + x \cdot y\right) \]
      6. *-commutativeN/A

        \[\leadsto z \cdot \left(\color{blue}{c \cdot \left(-1 \cdot b\right)} + x \cdot y\right) \]
      7. accelerator-lowering-fma.f64N/A

        \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(c, -1 \cdot b, x \cdot y\right)} \]
      8. neg-mul-1N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(b\right)}, x \cdot y\right) \]
      9. neg-sub0N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{0 - b}, x \cdot y\right) \]
      10. --lowering--.f64N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{0 - b}, x \cdot y\right) \]
      11. *-commutativeN/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, 0 - b, \color{blue}{y \cdot x}\right) \]
      12. *-lowering-*.f6446.9

        \[\leadsto z \cdot \mathsf{fma}\left(c, 0 - b, \color{blue}{y \cdot x}\right) \]
    5. Simplified46.9%

      \[\leadsto \color{blue}{z \cdot \mathsf{fma}\left(c, 0 - b, y \cdot x\right)} \]
    6. Taylor expanded in c around 0

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(y \cdot z\right)} \]
      2. *-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
      3. *-lowering-*.f6437.1

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
    8. Simplified37.1%

      \[\leadsto \color{blue}{x \cdot \left(z \cdot y\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification38.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.4 \cdot 10^{+49}:\\ \;\;\;\;z \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;y \leq 10^{-297}:\\ \;\;\;\;t \cdot \left(b \cdot i\right)\\ \mathbf{elif}\;y \leq 2050000000:\\ \;\;\;\;j \cdot \left(a \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z \cdot y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 29.6% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+20}:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;z \leq 135000000:\\ \;\;\;\;a \cdot \left(j \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z \cdot y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= z -1.6e+20)
   (* y (* x z))
   (if (<= z 135000000.0) (* a (* j c)) (* x (* z y)))))
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.6e+20) {
		tmp = y * (x * z);
	} else if (z <= 135000000.0) {
		tmp = a * (j * c);
	} else {
		tmp = x * (z * y);
	}
	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.6d+20)) then
        tmp = y * (x * z)
    else if (z <= 135000000.0d0) then
        tmp = a * (j * c)
    else
        tmp = x * (z * y)
    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.6e+20) {
		tmp = y * (x * z);
	} else if (z <= 135000000.0) {
		tmp = a * (j * c);
	} else {
		tmp = x * (z * y);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if z <= -1.6e+20:
		tmp = y * (x * z)
	elif z <= 135000000.0:
		tmp = a * (j * c)
	else:
		tmp = x * (z * y)
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (z <= -1.6e+20)
		tmp = Float64(y * Float64(x * z));
	elseif (z <= 135000000.0)
		tmp = Float64(a * Float64(j * c));
	else
		tmp = Float64(x * Float64(z * y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (z <= -1.6e+20)
		tmp = y * (x * z);
	elseif (z <= 135000000.0)
		tmp = a * (j * c);
	else
		tmp = x * (z * y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -1.6e+20], N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 135000000.0], N[(a * N[(j * c), $MachinePrecision]), $MachinePrecision], N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+20}:\\
\;\;\;\;y \cdot \left(x \cdot z\right)\\

\mathbf{elif}\;z \leq 135000000:\\
\;\;\;\;a \cdot \left(j \cdot c\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot y\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.6e20

    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 y around 0

      \[\leadsto \color{blue}{\left(-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + \left(a \cdot \left(c \cdot j\right) + y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)\right)\right) - b \cdot \left(c \cdot z - i \cdot t\right)} \]
    4. Simplified81.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, \mathsf{fma}\left(j, c, 0 - t \cdot x\right), \mathsf{fma}\left(b, i \cdot t - c \cdot z, y \cdot \mathsf{fma}\left(j, 0 - i, z \cdot x\right)\right)\right)} \]
    5. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
      2. +-commutativeN/A

        \[\leadsto y \cdot \color{blue}{\left(x \cdot z + -1 \cdot \left(i \cdot j\right)\right)} \]
      3. mul-1-negN/A

        \[\leadsto y \cdot \left(x \cdot z + \color{blue}{\left(\mathsf{neg}\left(i \cdot j\right)\right)}\right) \]
      4. unsub-negN/A

        \[\leadsto y \cdot \color{blue}{\left(x \cdot z - i \cdot j\right)} \]
      5. --lowering--.f64N/A

        \[\leadsto y \cdot \color{blue}{\left(x \cdot z - i \cdot j\right)} \]
      6. *-commutativeN/A

        \[\leadsto y \cdot \left(\color{blue}{z \cdot x} - i \cdot j\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto y \cdot \left(\color{blue}{z \cdot x} - i \cdot j\right) \]
      8. *-lowering-*.f6453.7

        \[\leadsto y \cdot \left(z \cdot x - \color{blue}{i \cdot j}\right) \]
    7. Simplified53.7%

      \[\leadsto \color{blue}{y \cdot \left(z \cdot x - i \cdot j\right)} \]
    8. Taylor expanded in z around inf

      \[\leadsto y \cdot \color{blue}{\left(x \cdot z\right)} \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto y \cdot \color{blue}{\left(z \cdot x\right)} \]
      2. *-lowering-*.f6439.2

        \[\leadsto y \cdot \color{blue}{\left(z \cdot x\right)} \]
    10. Simplified39.2%

      \[\leadsto y \cdot \color{blue}{\left(z \cdot x\right)} \]

    if -1.6e20 < z < 1.35e8

    1. Initial program 73.9%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
      2. +-commutativeN/A

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto a \cdot \color{blue}{\mathsf{fma}\left(j, c, -1 \cdot \left(t \cdot x\right)\right)} \]
      5. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. neg-sub0N/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{0 - t \cdot x}\right) \]
      7. --lowering--.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{0 - t \cdot x}\right) \]
      8. *-lowering-*.f6450.8

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, 0 - \color{blue}{t \cdot x}\right) \]
    5. Simplified50.8%

      \[\leadsto \color{blue}{a \cdot \mathsf{fma}\left(j, c, 0 - t \cdot x\right)} \]
    6. Taylor expanded in j around inf

      \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f6433.0

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
    8. Simplified33.0%

      \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]

    if 1.35e8 < z

    1. Initial program 72.4%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
      2. sub-negN/A

        \[\leadsto z \cdot \color{blue}{\left(x \cdot y + \left(\mathsf{neg}\left(b \cdot c\right)\right)\right)} \]
      3. mul-1-negN/A

        \[\leadsto z \cdot \left(x \cdot y + \color{blue}{-1 \cdot \left(b \cdot c\right)}\right) \]
      4. +-commutativeN/A

        \[\leadsto z \cdot \color{blue}{\left(-1 \cdot \left(b \cdot c\right) + x \cdot y\right)} \]
      5. associate-*r*N/A

        \[\leadsto z \cdot \left(\color{blue}{\left(-1 \cdot b\right) \cdot c} + x \cdot y\right) \]
      6. *-commutativeN/A

        \[\leadsto z \cdot \left(\color{blue}{c \cdot \left(-1 \cdot b\right)} + x \cdot y\right) \]
      7. accelerator-lowering-fma.f64N/A

        \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(c, -1 \cdot b, x \cdot y\right)} \]
      8. neg-mul-1N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(b\right)}, x \cdot y\right) \]
      9. neg-sub0N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{0 - b}, x \cdot y\right) \]
      10. --lowering--.f64N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{0 - b}, x \cdot y\right) \]
      11. *-commutativeN/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, 0 - b, \color{blue}{y \cdot x}\right) \]
      12. *-lowering-*.f6473.7

        \[\leadsto z \cdot \mathsf{fma}\left(c, 0 - b, \color{blue}{y \cdot x}\right) \]
    5. Simplified73.7%

      \[\leadsto \color{blue}{z \cdot \mathsf{fma}\left(c, 0 - b, y \cdot x\right)} \]
    6. Taylor expanded in c around 0

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(y \cdot z\right)} \]
      2. *-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
      3. *-lowering-*.f6445.0

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
    8. Simplified45.0%

      \[\leadsto \color{blue}{x \cdot \left(z \cdot y\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification37.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+20}:\\ \;\;\;\;y \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;z \leq 135000000:\\ \;\;\;\;a \cdot \left(j \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z \cdot y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 29.6% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(z \cdot y\right)\\ \mathbf{if}\;z \leq -8.2 \cdot 10^{+19}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1800000:\\ \;\;\;\;a \cdot \left(j \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* x (* z y))))
   (if (<= z -8.2e+19) t_1 (if (<= z 1800000.0) (* a (* j c)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = x * (z * y);
	double tmp;
	if (z <= -8.2e+19) {
		tmp = t_1;
	} else if (z <= 1800000.0) {
		tmp = a * (j * c);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x * (z * y)
    if (z <= (-8.2d+19)) then
        tmp = t_1
    else if (z <= 1800000.0d0) then
        tmp = a * (j * c)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = x * (z * y);
	double tmp;
	if (z <= -8.2e+19) {
		tmp = t_1;
	} else if (z <= 1800000.0) {
		tmp = a * (j * c);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = x * (z * y)
	tmp = 0
	if z <= -8.2e+19:
		tmp = t_1
	elif z <= 1800000.0:
		tmp = a * (j * c)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(x * Float64(z * y))
	tmp = 0.0
	if (z <= -8.2e+19)
		tmp = t_1;
	elseif (z <= 1800000.0)
		tmp = Float64(a * Float64(j * c));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = x * (z * y);
	tmp = 0.0;
	if (z <= -8.2e+19)
		tmp = t_1;
	elseif (z <= 1800000.0)
		tmp = a * (j * c);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.2e+19], t$95$1, If[LessEqual[z, 1800000.0], N[(a * N[(j * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \left(z \cdot y\right)\\
\mathbf{if}\;z \leq -8.2 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1800000:\\
\;\;\;\;a \cdot \left(j \cdot c\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.2e19 or 1.8e6 < z

    1. Initial program 71.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

      \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
      2. sub-negN/A

        \[\leadsto z \cdot \color{blue}{\left(x \cdot y + \left(\mathsf{neg}\left(b \cdot c\right)\right)\right)} \]
      3. mul-1-negN/A

        \[\leadsto z \cdot \left(x \cdot y + \color{blue}{-1 \cdot \left(b \cdot c\right)}\right) \]
      4. +-commutativeN/A

        \[\leadsto z \cdot \color{blue}{\left(-1 \cdot \left(b \cdot c\right) + x \cdot y\right)} \]
      5. associate-*r*N/A

        \[\leadsto z \cdot \left(\color{blue}{\left(-1 \cdot b\right) \cdot c} + x \cdot y\right) \]
      6. *-commutativeN/A

        \[\leadsto z \cdot \left(\color{blue}{c \cdot \left(-1 \cdot b\right)} + x \cdot y\right) \]
      7. accelerator-lowering-fma.f64N/A

        \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(c, -1 \cdot b, x \cdot y\right)} \]
      8. neg-mul-1N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{\mathsf{neg}\left(b\right)}, x \cdot y\right) \]
      9. neg-sub0N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{0 - b}, x \cdot y\right) \]
      10. --lowering--.f64N/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, \color{blue}{0 - b}, x \cdot y\right) \]
      11. *-commutativeN/A

        \[\leadsto z \cdot \mathsf{fma}\left(c, 0 - b, \color{blue}{y \cdot x}\right) \]
      12. *-lowering-*.f6466.0

        \[\leadsto z \cdot \mathsf{fma}\left(c, 0 - b, \color{blue}{y \cdot x}\right) \]
    5. Simplified66.0%

      \[\leadsto \color{blue}{z \cdot \mathsf{fma}\left(c, 0 - b, y \cdot x\right)} \]
    6. Taylor expanded in c around 0

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(y \cdot z\right)} \]
      2. *-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
      3. *-lowering-*.f6441.8

        \[\leadsto x \cdot \color{blue}{\left(z \cdot y\right)} \]
    8. Simplified41.8%

      \[\leadsto \color{blue}{x \cdot \left(z \cdot y\right)} \]

    if -8.2e19 < z < 1.8e6

    1. Initial program 73.9%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
      2. +-commutativeN/A

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto a \cdot \color{blue}{\mathsf{fma}\left(j, c, -1 \cdot \left(t \cdot x\right)\right)} \]
      5. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. neg-sub0N/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{0 - t \cdot x}\right) \]
      7. --lowering--.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{0 - t \cdot x}\right) \]
      8. *-lowering-*.f6450.8

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, 0 - \color{blue}{t \cdot x}\right) \]
    5. Simplified50.8%

      \[\leadsto \color{blue}{a \cdot \mathsf{fma}\left(j, c, 0 - t \cdot x\right)} \]
    6. Taylor expanded in j around inf

      \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f6433.0

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
    8. Simplified33.0%

      \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification37.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.2 \cdot 10^{+19}:\\ \;\;\;\;x \cdot \left(z \cdot y\right)\\ \mathbf{elif}\;z \leq 1800000:\\ \;\;\;\;a \cdot \left(j \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z \cdot y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 29.3% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := a \cdot \left(j \cdot c\right)\\ \mathbf{if}\;c \leq -4 \cdot 10^{-17}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq 2.95 \cdot 10^{+113}:\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* a (* j c))))
   (if (<= c -4e-17) t_1 (if (<= c 2.95e+113) (* b (* t i)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = a * (j * c);
	double tmp;
	if (c <= -4e-17) {
		tmp = t_1;
	} else if (c <= 2.95e+113) {
		tmp = b * (t * i);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = a * (j * c)
    if (c <= (-4d-17)) then
        tmp = t_1
    else if (c <= 2.95d+113) then
        tmp = b * (t * i)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = a * (j * c);
	double tmp;
	if (c <= -4e-17) {
		tmp = t_1;
	} else if (c <= 2.95e+113) {
		tmp = b * (t * i);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = a * (j * c)
	tmp = 0
	if c <= -4e-17:
		tmp = t_1
	elif c <= 2.95e+113:
		tmp = b * (t * i)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(a * Float64(j * c))
	tmp = 0.0
	if (c <= -4e-17)
		tmp = t_1;
	elseif (c <= 2.95e+113)
		tmp = Float64(b * Float64(t * i));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = a * (j * c);
	tmp = 0.0;
	if (c <= -4e-17)
		tmp = t_1;
	elseif (c <= 2.95e+113)
		tmp = b * (t * i);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(a * N[(j * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4e-17], t$95$1, If[LessEqual[c, 2.95e+113], N[(b * N[(t * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := a \cdot \left(j \cdot c\right)\\
\mathbf{if}\;c \leq -4 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq 2.95 \cdot 10^{+113}:\\
\;\;\;\;b \cdot \left(t \cdot i\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -4.00000000000000029e-17 or 2.95000000000000011e113 < c

    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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
      2. +-commutativeN/A

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto a \cdot \color{blue}{\mathsf{fma}\left(j, c, -1 \cdot \left(t \cdot x\right)\right)} \]
      5. mul-1-negN/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
      6. neg-sub0N/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{0 - t \cdot x}\right) \]
      7. --lowering--.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{0 - t \cdot x}\right) \]
      8. *-lowering-*.f6452.2

        \[\leadsto a \cdot \mathsf{fma}\left(j, c, 0 - \color{blue}{t \cdot x}\right) \]
    5. Simplified52.2%

      \[\leadsto \color{blue}{a \cdot \mathsf{fma}\left(j, c, 0 - t \cdot x\right)} \]
    6. Taylor expanded in j around inf

      \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f6444.1

        \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
    8. Simplified44.1%

      \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]

    if -4.00000000000000029e-17 < c < 2.95000000000000011e113

    1. Initial program 79.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 b around inf

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    4. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto b \cdot \color{blue}{\left(i \cdot t + \left(\mathsf{neg}\left(c \cdot z\right)\right)\right)} \]
      2. distribute-lft-inN/A

        \[\leadsto \color{blue}{b \cdot \left(i \cdot t\right) + b \cdot \left(\mathsf{neg}\left(c \cdot z\right)\right)} \]
      3. remove-double-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot \left(i \cdot t\right)\right)\right)\right)\right)} + b \cdot \left(\mathsf{neg}\left(c \cdot z\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{-1 \cdot \left(b \cdot \left(i \cdot t\right)\right)}\right)\right) + b \cdot \left(\mathsf{neg}\left(c \cdot z\right)\right) \]
      5. distribute-rgt-neg-inN/A

        \[\leadsto \left(\mathsf{neg}\left(-1 \cdot \left(b \cdot \left(i \cdot t\right)\right)\right)\right) + \color{blue}{\left(\mathsf{neg}\left(b \cdot \left(c \cdot z\right)\right)\right)} \]
      6. distribute-neg-inN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\left(-1 \cdot \left(b \cdot \left(i \cdot t\right)\right) + b \cdot \left(c \cdot z\right)\right)\right)} \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{\left(b \cdot \left(c \cdot z\right) + -1 \cdot \left(b \cdot \left(i \cdot t\right)\right)\right)}\right) \]
      8. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(\left(b \cdot \left(c \cdot z\right) + \color{blue}{\left(\mathsf{neg}\left(b \cdot \left(i \cdot t\right)\right)\right)}\right)\right) \]
      9. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{neg}\left(\left(b \cdot \left(c \cdot z\right) + \color{blue}{b \cdot \left(\mathsf{neg}\left(i \cdot t\right)\right)}\right)\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(\left(b \cdot \left(c \cdot z\right) + b \cdot \color{blue}{\left(-1 \cdot \left(i \cdot t\right)\right)}\right)\right) \]
      11. distribute-lft-inN/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{b \cdot \left(c \cdot z + -1 \cdot \left(i \cdot t\right)\right)}\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(b \cdot \left(c \cdot z + \color{blue}{\left(\mathsf{neg}\left(i \cdot t\right)\right)}\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{neg}\left(b \cdot \color{blue}{\left(c \cdot z - i \cdot t\right)}\right) \]
      14. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{b \cdot \left(\mathsf{neg}\left(\left(c \cdot z - i \cdot t\right)\right)\right)} \]
      15. mul-1-negN/A

        \[\leadsto b \cdot \color{blue}{\left(-1 \cdot \left(c \cdot z - i \cdot t\right)\right)} \]
      16. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{b \cdot \left(-1 \cdot \left(c \cdot z - i \cdot t\right)\right)} \]
      17. mul-1-negN/A

        \[\leadsto b \cdot \color{blue}{\left(\mathsf{neg}\left(\left(c \cdot z - i \cdot t\right)\right)\right)} \]
      18. sub-negN/A

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\color{blue}{\left(c \cdot z + \left(\mathsf{neg}\left(i \cdot t\right)\right)\right)}\right)\right) \]
      19. mul-1-negN/A

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(c \cdot z + \color{blue}{-1 \cdot \left(i \cdot t\right)}\right)\right)\right) \]
    5. Simplified36.3%

      \[\leadsto \color{blue}{b \cdot \left(i \cdot t - c \cdot z\right)} \]
    6. Taylor expanded in i around inf

      \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f6427.0

        \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} \]
    8. Simplified27.0%

      \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification34.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -4 \cdot 10^{-17}:\\ \;\;\;\;a \cdot \left(j \cdot c\right)\\ \mathbf{elif}\;c \leq 2.95 \cdot 10^{+113}:\\ \;\;\;\;b \cdot \left(t \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(j \cdot c\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 22.5% accurate, 5.5× speedup?

\[\begin{array}{l} \\ a \cdot \left(j \cdot c\right) \end{array} \]
(FPCore (x y z t a b c i j) :precision binary64 (* a (* j c)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return a * (j * c);
}
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 * (j * c)
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 * (j * c);
}
def code(x, y, z, t, a, b, c, i, j):
	return a * (j * c)
function code(x, y, z, t, a, b, c, i, j)
	return Float64(a * Float64(j * c))
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = a * (j * c);
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(a * N[(j * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
a \cdot \left(j \cdot c\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

    \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
  4. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    2. +-commutativeN/A

      \[\leadsto a \cdot \color{blue}{\left(c \cdot j + -1 \cdot \left(t \cdot x\right)\right)} \]
    3. *-commutativeN/A

      \[\leadsto a \cdot \left(\color{blue}{j \cdot c} + -1 \cdot \left(t \cdot x\right)\right) \]
    4. accelerator-lowering-fma.f64N/A

      \[\leadsto a \cdot \color{blue}{\mathsf{fma}\left(j, c, -1 \cdot \left(t \cdot x\right)\right)} \]
    5. mul-1-negN/A

      \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{\mathsf{neg}\left(t \cdot x\right)}\right) \]
    6. neg-sub0N/A

      \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{0 - t \cdot x}\right) \]
    7. --lowering--.f64N/A

      \[\leadsto a \cdot \mathsf{fma}\left(j, c, \color{blue}{0 - t \cdot x}\right) \]
    8. *-lowering-*.f6439.1

      \[\leadsto a \cdot \mathsf{fma}\left(j, c, 0 - \color{blue}{t \cdot x}\right) \]
  5. Simplified39.1%

    \[\leadsto \color{blue}{a \cdot \mathsf{fma}\left(j, c, 0 - t \cdot x\right)} \]
  6. Taylor expanded in j around inf

    \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
  7. Step-by-step derivation
    1. *-lowering-*.f6424.0

      \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
  8. Simplified24.0%

    \[\leadsto a \cdot \color{blue}{\left(c \cdot j\right)} \]
  9. Final simplification24.0%

    \[\leadsto a \cdot \left(j \cdot c\right) \]
  10. Add Preprocessing

Developer Target 1: 59.2% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\ t_2 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + t\_1\\ \mathbf{if}\;x < -1.469694296777705 \cdot 10^{-64}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x < 3.2113527362226803 \cdot 10^{-147}:\\ \;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* j (- (* c a) (* y i))))
        (t_2
         (+
          (-
           (* x (- (* y z) (* t a)))
           (/
            (* b (- (pow (* c z) 2.0) (pow (* t i) 2.0)))
            (+ (* c z) (* t i))))
          t_1)))
   (if (< x -1.469694296777705e-64)
     t_2
     (if (< x 3.2113527362226803e-147)
       (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) t_1))
       t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = j * ((c * a) - (y * i));
	double t_2 = ((x * ((y * z) - (t * a))) - ((b * (pow((c * z), 2.0) - pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
	double tmp;
	if (x < -1.469694296777705e-64) {
		tmp = t_2;
	} else if (x < 3.2113527362226803e-147) {
		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = j * ((c * a) - (y * i))
    t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ** 2.0d0) - ((t * i) ** 2.0d0))) / ((c * z) + (t * i)))) + t_1
    if (x < (-1.469694296777705d-64)) then
        tmp = t_2
    else if (x < 3.2113527362226803d-147) then
        tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = j * ((c * a) - (y * i));
	double t_2 = ((x * ((y * z) - (t * a))) - ((b * (Math.pow((c * z), 2.0) - Math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
	double tmp;
	if (x < -1.469694296777705e-64) {
		tmp = t_2;
	} else if (x < 3.2113527362226803e-147) {
		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = j * ((c * a) - (y * i))
	t_2 = ((x * ((y * z) - (t * a))) - ((b * (math.pow((c * z), 2.0) - math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1
	tmp = 0
	if x < -1.469694296777705e-64:
		tmp = t_2
	elif x < 3.2113527362226803e-147:
		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i)))
	t_2 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(Float64(b * Float64((Float64(c * z) ^ 2.0) - (Float64(t * i) ^ 2.0))) / Float64(Float64(c * z) + Float64(t * i)))) + t_1)
	tmp = 0.0
	if (x < -1.469694296777705e-64)
		tmp = t_2;
	elseif (x < 3.2113527362226803e-147)
		tmp = Float64(Float64(Float64(Float64(b * i) - Float64(x * a)) * t) - Float64(Float64(z * Float64(c * b)) - t_1));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = j * ((c * a) - (y * i));
	t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ^ 2.0) - ((t * i) ^ 2.0))) / ((c * z) + (t * i)))) + t_1;
	tmp = 0.0;
	if (x < -1.469694296777705e-64)
		tmp = t_2;
	elseif (x < 3.2113527362226803e-147)
		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[Power[N[(c * z), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(t * i), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * z), $MachinePrecision] + N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[Less[x, -1.469694296777705e-64], t$95$2, If[Less[x, 3.2113527362226803e-147], N[(N[(N[(N[(b * i), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] - N[(N[(z * N[(c * b), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
t_2 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + t\_1\\
\mathbf{if}\;x < -1.469694296777705 \cdot 10^{-64}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x < 3.2113527362226803 \cdot 10^{-147}:\\
\;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - t\_1\right)\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024195 
(FPCore (x y z t a b c i j)
  :name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< x -293938859355541/2000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))) (if (< x 32113527362226803/10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) (* j (- (* c a) (* y i))))) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))))))

  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))