xx*yy + yx*zy + zx*xy - xx*zy - yx*xy - zx*yy

Percentage Accurate: 88.3% → 95.2%
Time: 7.6s
Alternatives: 12
Speedup: 0.5×

Specification

?
\[\left(\left(\left(\left(\left(-1.79 \cdot 10^{+308} \leq xx \land xx \leq 1.79 \cdot 10^{+308}\right) \land \left(-1.79 \cdot 10^{+308} \leq yy \land yy \leq 1.79 \cdot 10^{+308}\right)\right) \land \left(-1.79 \cdot 10^{+308} \leq yx \land yx \leq 1.79 \cdot 10^{+308}\right)\right) \land \left(-1.79 \cdot 10^{+308} \leq zy \land zy \leq 1.79 \cdot 10^{+308}\right)\right) \land \left(-1.79 \cdot 10^{+308} \leq zx \land zx \leq 1.79 \cdot 10^{+308}\right)\right) \land \left(-1.79 \cdot 10^{+308} \leq xy \land xy \leq 1.79 \cdot 10^{+308}\right)\]
\[\begin{array}{l} \\ \left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \end{array} \]
(FPCore (xx yy yx zy zx xy)
 :precision binary64
 (-
  (- (- (+ (+ (* xx yy) (* yx zy)) (* zx xy)) (* xx zy)) (* yx xy))
  (* zx yy)))
double code(double xx, double yy, double yx, double zy, double zx, double xy) {
	return (((((xx * yy) + (yx * zy)) + (zx * xy)) - (xx * zy)) - (yx * xy)) - (zx * yy);
}
real(8) function code(xx, yy, yx, zy, zx, xy)
    real(8), intent (in) :: xx
    real(8), intent (in) :: yy
    real(8), intent (in) :: yx
    real(8), intent (in) :: zy
    real(8), intent (in) :: zx
    real(8), intent (in) :: xy
    code = (((((xx * yy) + (yx * zy)) + (zx * xy)) - (xx * zy)) - (yx * xy)) - (zx * yy)
end function
public static double code(double xx, double yy, double yx, double zy, double zx, double xy) {
	return (((((xx * yy) + (yx * zy)) + (zx * xy)) - (xx * zy)) - (yx * xy)) - (zx * yy);
}
def code(xx, yy, yx, zy, zx, xy):
	return (((((xx * yy) + (yx * zy)) + (zx * xy)) - (xx * zy)) - (yx * xy)) - (zx * yy)
function code(xx, yy, yx, zy, zx, xy)
	return Float64(Float64(Float64(Float64(Float64(Float64(xx * yy) + Float64(yx * zy)) + Float64(zx * xy)) - Float64(xx * zy)) - Float64(yx * xy)) - Float64(zx * yy))
end
function tmp = code(xx, yy, yx, zy, zx, xy)
	tmp = (((((xx * yy) + (yx * zy)) + (zx * xy)) - (xx * zy)) - (yx * xy)) - (zx * yy);
end
code[xx_, yy_, yx_, zy_, zx_, xy_] := N[(N[(N[(N[(N[(N[(xx * yy), $MachinePrecision] + N[(yx * zy), $MachinePrecision]), $MachinePrecision] + N[(zx * xy), $MachinePrecision]), $MachinePrecision] - N[(xx * zy), $MachinePrecision]), $MachinePrecision] - N[(yx * xy), $MachinePrecision]), $MachinePrecision] - N[(zx * yy), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy
\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 12 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: 88.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \end{array} \]
(FPCore (xx yy yx zy zx xy)
 :precision binary64
 (-
  (- (- (+ (+ (* xx yy) (* yx zy)) (* zx xy)) (* xx zy)) (* yx xy))
  (* zx yy)))
double code(double xx, double yy, double yx, double zy, double zx, double xy) {
	return (((((xx * yy) + (yx * zy)) + (zx * xy)) - (xx * zy)) - (yx * xy)) - (zx * yy);
}
real(8) function code(xx, yy, yx, zy, zx, xy)
    real(8), intent (in) :: xx
    real(8), intent (in) :: yy
    real(8), intent (in) :: yx
    real(8), intent (in) :: zy
    real(8), intent (in) :: zx
    real(8), intent (in) :: xy
    code = (((((xx * yy) + (yx * zy)) + (zx * xy)) - (xx * zy)) - (yx * xy)) - (zx * yy)
end function
public static double code(double xx, double yy, double yx, double zy, double zx, double xy) {
	return (((((xx * yy) + (yx * zy)) + (zx * xy)) - (xx * zy)) - (yx * xy)) - (zx * yy);
}
def code(xx, yy, yx, zy, zx, xy):
	return (((((xx * yy) + (yx * zy)) + (zx * xy)) - (xx * zy)) - (yx * xy)) - (zx * yy)
function code(xx, yy, yx, zy, zx, xy)
	return Float64(Float64(Float64(Float64(Float64(Float64(xx * yy) + Float64(yx * zy)) + Float64(zx * xy)) - Float64(xx * zy)) - Float64(yx * xy)) - Float64(zx * yy))
end
function tmp = code(xx, yy, yx, zy, zx, xy)
	tmp = (((((xx * yy) + (yx * zy)) + (zx * xy)) - (xx * zy)) - (yx * xy)) - (zx * yy);
end
code[xx_, yy_, yx_, zy_, zx_, xy_] := N[(N[(N[(N[(N[(N[(xx * yy), $MachinePrecision] + N[(yx * zy), $MachinePrecision]), $MachinePrecision] + N[(zx * xy), $MachinePrecision]), $MachinePrecision] - N[(xx * zy), $MachinePrecision]), $MachinePrecision] - N[(yx * xy), $MachinePrecision]), $MachinePrecision] - N[(zx * yy), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy
\end{array}

Alternative 1: 95.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy\\ \mathbf{if}\;t\_0 \leq \infty:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(zx - yx, xy, \left(xx - zx\right) \cdot yy\right)\\ \end{array} \end{array} \]
(FPCore (xx yy yx zy zx xy)
 :precision binary64
 (let* ((t_0
         (-
          (- (- (+ (+ (* xx yy) (* yx zy)) (* zx xy)) (* xx zy)) (* yx xy))
          (* zx yy))))
   (if (<= t_0 INFINITY) t_0 (fma (- zx yx) xy (* (- xx zx) yy)))))
double code(double xx, double yy, double yx, double zy, double zx, double xy) {
	double t_0 = (((((xx * yy) + (yx * zy)) + (zx * xy)) - (xx * zy)) - (yx * xy)) - (zx * yy);
	double tmp;
	if (t_0 <= ((double) INFINITY)) {
		tmp = t_0;
	} else {
		tmp = fma((zx - yx), xy, ((xx - zx) * yy));
	}
	return tmp;
}
function code(xx, yy, yx, zy, zx, xy)
	t_0 = Float64(Float64(Float64(Float64(Float64(Float64(xx * yy) + Float64(yx * zy)) + Float64(zx * xy)) - Float64(xx * zy)) - Float64(yx * xy)) - Float64(zx * yy))
	tmp = 0.0
	if (t_0 <= Inf)
		tmp = t_0;
	else
		tmp = fma(Float64(zx - yx), xy, Float64(Float64(xx - zx) * yy));
	end
	return tmp
end
code[xx_, yy_, yx_, zy_, zx_, xy_] := Block[{t$95$0 = N[(N[(N[(N[(N[(N[(xx * yy), $MachinePrecision] + N[(yx * zy), $MachinePrecision]), $MachinePrecision] + N[(zx * xy), $MachinePrecision]), $MachinePrecision] - N[(xx * zy), $MachinePrecision]), $MachinePrecision] - N[(yx * xy), $MachinePrecision]), $MachinePrecision] - N[(zx * yy), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, Infinity], t$95$0, N[(N[(zx - yx), $MachinePrecision] * xy + N[(N[(xx - zx), $MachinePrecision] * yy), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy\\
\mathbf{if}\;t\_0 \leq \infty:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(zx - yx, xy, \left(xx - zx\right) \cdot yy\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (-.f64 (-.f64 (+.f64 (+.f64 (*.f64 xx yy) (*.f64 yx zy)) (*.f64 zx xy)) (*.f64 xx zy)) (*.f64 yx xy)) (*.f64 zx yy)) < +inf.0

    1. Initial program 100.0%

      \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
    2. Add Preprocessing

    if +inf.0 < (-.f64 (-.f64 (-.f64 (+.f64 (+.f64 (*.f64 xx yy) (*.f64 yx zy)) (*.f64 zx xy)) (*.f64 xx zy)) (*.f64 yx xy)) (*.f64 zx yy))

    1. Initial program 0.0%

      \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
    2. Add Preprocessing
    3. Taylor expanded in zy around 0

      \[\leadsto \color{blue}{\left(xx \cdot yy + xy \cdot zx\right) - \left(xy \cdot yx + yy \cdot zx\right)} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\left(xy \cdot zx + xx \cdot yy\right)} - \left(xy \cdot yx + yy \cdot zx\right) \]
      2. associate--l+N/A

        \[\leadsto \color{blue}{xy \cdot zx + \left(xx \cdot yy - \left(xy \cdot yx + yy \cdot zx\right)\right)} \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(xy, zx, xx \cdot yy - \left(xy \cdot yx + yy \cdot zx\right)\right)} \]
      4. sub-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{xx \cdot yy + \left(\mathsf{neg}\left(\left(xy \cdot yx + yy \cdot zx\right)\right)\right)}\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\mathsf{neg}\left(\color{blue}{\left(yy \cdot zx + xy \cdot yx\right)}\right)\right)\right) \]
      6. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \color{blue}{\left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \left(\mathsf{neg}\left(xy \cdot yx\right)\right)\right)}\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \left(\mathsf{neg}\left(\color{blue}{yx \cdot xy}\right)\right)\right)\right) \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \color{blue}{\left(\mathsf{neg}\left(yx\right)\right) \cdot xy}\right)\right) \]
      9. associate-+r+N/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\left(xx \cdot yy + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy}\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \left(\color{blue}{yy \cdot xx} + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \left(yy \cdot xx + \color{blue}{yy \cdot \left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \left(yy \cdot xx + yy \cdot \color{blue}{\left(-1 \cdot zx\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      13. distribute-lft-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{yy \cdot \left(xx + -1 \cdot zx\right)} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      14. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, yy \cdot \left(xx + \color{blue}{\left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      15. sub-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, yy \cdot \color{blue}{\left(xx - zx\right)} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\left(xx - zx\right) \cdot yy} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      17. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\mathsf{fma}\left(xx - zx, yy, \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right)}\right) \]
      18. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \mathsf{fma}\left(\color{blue}{xx - zx}, yy, \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right)\right) \]
    5. Applied rewrites56.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(xy, zx, \mathsf{fma}\left(xx - zx, yy, \left(-yx\right) \cdot xy\right)\right)} \]
    6. Taylor expanded in zy around 0

      \[\leadsto \color{blue}{\left(xx \cdot yy + xy \cdot zx\right) - \left(xy \cdot yx + yy \cdot zx\right)} \]
    7. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{\left(xx \cdot yy + xy \cdot zx\right) + \left(\mathsf{neg}\left(\left(xy \cdot yx + yy \cdot zx\right)\right)\right)} \]
      2. neg-mul-1N/A

        \[\leadsto \left(xx \cdot yy + xy \cdot zx\right) + \color{blue}{-1 \cdot \left(xy \cdot yx + yy \cdot zx\right)} \]
      3. distribute-lft-outN/A

        \[\leadsto \left(xx \cdot yy + xy \cdot zx\right) + \color{blue}{\left(-1 \cdot \left(xy \cdot yx\right) + -1 \cdot \left(yy \cdot zx\right)\right)} \]
      4. +-commutativeN/A

        \[\leadsto \left(xx \cdot yy + xy \cdot zx\right) + \color{blue}{\left(-1 \cdot \left(yy \cdot zx\right) + -1 \cdot \left(xy \cdot yx\right)\right)} \]
      5. associate-+l+N/A

        \[\leadsto \color{blue}{\left(\left(xx \cdot yy + xy \cdot zx\right) + -1 \cdot \left(yy \cdot zx\right)\right) + -1 \cdot \left(xy \cdot yx\right)} \]
      6. +-commutativeN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(yy \cdot zx\right) + \left(xx \cdot yy + xy \cdot zx\right)\right)} + -1 \cdot \left(xy \cdot yx\right) \]
      7. associate-+r+N/A

        \[\leadsto \color{blue}{\left(\left(-1 \cdot \left(yy \cdot zx\right) + xx \cdot yy\right) + xy \cdot zx\right)} + -1 \cdot \left(xy \cdot yx\right) \]
      8. associate-+l+N/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(yy \cdot zx\right) + xx \cdot yy\right) + \left(xy \cdot zx + -1 \cdot \left(xy \cdot yx\right)\right)} \]
      9. +-commutativeN/A

        \[\leadsto \color{blue}{\left(xx \cdot yy + -1 \cdot \left(yy \cdot zx\right)\right)} + \left(xy \cdot zx + -1 \cdot \left(xy \cdot yx\right)\right) \]
      10. mul-1-negN/A

        \[\leadsto \left(xx \cdot yy + \color{blue}{\left(\mathsf{neg}\left(yy \cdot zx\right)\right)}\right) + \left(xy \cdot zx + -1 \cdot \left(xy \cdot yx\right)\right) \]
      11. unsub-negN/A

        \[\leadsto \color{blue}{\left(xx \cdot yy - yy \cdot zx\right)} + \left(xy \cdot zx + -1 \cdot \left(xy \cdot yx\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \left(\color{blue}{yy \cdot xx} - yy \cdot zx\right) + \left(xy \cdot zx + -1 \cdot \left(xy \cdot yx\right)\right) \]
      13. distribute-lft-out--N/A

        \[\leadsto \color{blue}{yy \cdot \left(xx - zx\right)} + \left(xy \cdot zx + -1 \cdot \left(xy \cdot yx\right)\right) \]
      14. mul-1-negN/A

        \[\leadsto yy \cdot \left(xx - zx\right) + \left(xy \cdot zx + \color{blue}{\left(\mathsf{neg}\left(xy \cdot yx\right)\right)}\right) \]
      15. distribute-rgt-neg-inN/A

        \[\leadsto yy \cdot \left(xx - zx\right) + \left(xy \cdot zx + \color{blue}{xy \cdot \left(\mathsf{neg}\left(yx\right)\right)}\right) \]
      16. mul-1-negN/A

        \[\leadsto yy \cdot \left(xx - zx\right) + \left(xy \cdot zx + xy \cdot \color{blue}{\left(-1 \cdot yx\right)}\right) \]
      17. distribute-lft-inN/A

        \[\leadsto yy \cdot \left(xx - zx\right) + \color{blue}{xy \cdot \left(zx + -1 \cdot yx\right)} \]
      18. +-commutativeN/A

        \[\leadsto \color{blue}{xy \cdot \left(zx + -1 \cdot yx\right) + yy \cdot \left(xx - zx\right)} \]
    8. Applied rewrites66.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(zx - yx, xy, \left(xx - zx\right) \cdot yy\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 80.9% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(zy, yx, \mathsf{fma}\left(xx - zx, yy, \left(-xx\right) \cdot zy\right)\right)\\ \mathbf{if}\;zy \leq -1.5 \cdot 10^{-26}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;zy \leq 4 \cdot 10^{+33}:\\ \;\;\;\;\mathsf{fma}\left(zx - yx, xy, \left(xx - zx\right) \cdot yy\right)\\ \mathbf{elif}\;zy \leq 2.5 \cdot 10^{+199}:\\ \;\;\;\;\mathsf{fma}\left(yy - zy, xx, \left(xy - yy\right) \cdot zx\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (xx yy yx zy zx xy)
 :precision binary64
 (let* ((t_0 (fma zy yx (fma (- xx zx) yy (* (- xx) zy)))))
   (if (<= zy -1.5e-26)
     t_0
     (if (<= zy 4e+33)
       (fma (- zx yx) xy (* (- xx zx) yy))
       (if (<= zy 2.5e+199) (fma (- yy zy) xx (* (- xy yy) zx)) t_0)))))
double code(double xx, double yy, double yx, double zy, double zx, double xy) {
	double t_0 = fma(zy, yx, fma((xx - zx), yy, (-xx * zy)));
	double tmp;
	if (zy <= -1.5e-26) {
		tmp = t_0;
	} else if (zy <= 4e+33) {
		tmp = fma((zx - yx), xy, ((xx - zx) * yy));
	} else if (zy <= 2.5e+199) {
		tmp = fma((yy - zy), xx, ((xy - yy) * zx));
	} else {
		tmp = t_0;
	}
	return tmp;
}
function code(xx, yy, yx, zy, zx, xy)
	t_0 = fma(zy, yx, fma(Float64(xx - zx), yy, Float64(Float64(-xx) * zy)))
	tmp = 0.0
	if (zy <= -1.5e-26)
		tmp = t_0;
	elseif (zy <= 4e+33)
		tmp = fma(Float64(zx - yx), xy, Float64(Float64(xx - zx) * yy));
	elseif (zy <= 2.5e+199)
		tmp = fma(Float64(yy - zy), xx, Float64(Float64(xy - yy) * zx));
	else
		tmp = t_0;
	end
	return tmp
end
code[xx_, yy_, yx_, zy_, zx_, xy_] := Block[{t$95$0 = N[(zy * yx + N[(N[(xx - zx), $MachinePrecision] * yy + N[((-xx) * zy), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[zy, -1.5e-26], t$95$0, If[LessEqual[zy, 4e+33], N[(N[(zx - yx), $MachinePrecision] * xy + N[(N[(xx - zx), $MachinePrecision] * yy), $MachinePrecision]), $MachinePrecision], If[LessEqual[zy, 2.5e+199], N[(N[(yy - zy), $MachinePrecision] * xx + N[(N[(xy - yy), $MachinePrecision] * zx), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(zy, yx, \mathsf{fma}\left(xx - zx, yy, \left(-xx\right) \cdot zy\right)\right)\\
\mathbf{if}\;zy \leq -1.5 \cdot 10^{-26}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;zy \leq 4 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{fma}\left(zx - yx, xy, \left(xx - zx\right) \cdot yy\right)\\

\mathbf{elif}\;zy \leq 2.5 \cdot 10^{+199}:\\
\;\;\;\;\mathsf{fma}\left(yy - zy, xx, \left(xy - yy\right) \cdot zx\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if zy < -1.50000000000000006e-26 or 2.4999999999999999e199 < zy

    1. Initial program 71.1%

      \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
    2. Add Preprocessing
    3. Taylor expanded in xy around 0

      \[\leadsto \color{blue}{\left(xx \cdot yy + yx \cdot zy\right) - \left(xx \cdot zy + yy \cdot zx\right)} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\left(yx \cdot zy + xx \cdot yy\right)} - \left(xx \cdot zy + yy \cdot zx\right) \]
      2. associate--l+N/A

        \[\leadsto \color{blue}{yx \cdot zy + \left(xx \cdot yy - \left(xx \cdot zy + yy \cdot zx\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto \color{blue}{zy \cdot yx} + \left(xx \cdot yy - \left(xx \cdot zy + yy \cdot zx\right)\right) \]
      4. sub-negN/A

        \[\leadsto zy \cdot yx + \color{blue}{\left(xx \cdot yy + \left(\mathsf{neg}\left(\left(xx \cdot zy + yy \cdot zx\right)\right)\right)\right)} \]
      5. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(zy, yx, xx \cdot yy + \left(\mathsf{neg}\left(\left(xx \cdot zy + yy \cdot zx\right)\right)\right)\right)} \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(zy, yx, xx \cdot yy + \left(\mathsf{neg}\left(\color{blue}{\left(yy \cdot zx + xx \cdot zy\right)}\right)\right)\right) \]
      7. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(zy, yx, xx \cdot yy + \color{blue}{\left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \left(\mathsf{neg}\left(xx \cdot zy\right)\right)\right)}\right) \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(zy, yx, xx \cdot yy + \left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \color{blue}{\left(\mathsf{neg}\left(xx\right)\right) \cdot zy}\right)\right) \]
      9. associate-+r+N/A

        \[\leadsto \mathsf{fma}\left(zy, yx, \color{blue}{\left(xx \cdot yy + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(xx\right)\right) \cdot zy}\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(zy, yx, \left(\color{blue}{yy \cdot xx} + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(xx\right)\right) \cdot zy\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(zy, yx, \left(yy \cdot xx + \color{blue}{yy \cdot \left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(xx\right)\right) \cdot zy\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(zy, yx, \left(yy \cdot xx + yy \cdot \color{blue}{\left(-1 \cdot zx\right)}\right) + \left(\mathsf{neg}\left(xx\right)\right) \cdot zy\right) \]
      13. distribute-lft-inN/A

        \[\leadsto \mathsf{fma}\left(zy, yx, \color{blue}{yy \cdot \left(xx + -1 \cdot zx\right)} + \left(\mathsf{neg}\left(xx\right)\right) \cdot zy\right) \]
      14. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(zy, yx, yy \cdot \left(xx + \color{blue}{\left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(xx\right)\right) \cdot zy\right) \]
      15. sub-negN/A

        \[\leadsto \mathsf{fma}\left(zy, yx, yy \cdot \color{blue}{\left(xx - zx\right)} + \left(\mathsf{neg}\left(xx\right)\right) \cdot zy\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(zy, yx, \color{blue}{\left(xx - zx\right) \cdot yy} + \left(\mathsf{neg}\left(xx\right)\right) \cdot zy\right) \]
      17. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(zy, yx, \color{blue}{\mathsf{fma}\left(xx - zx, yy, \left(\mathsf{neg}\left(xx\right)\right) \cdot zy\right)}\right) \]
      18. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(zy, yx, \mathsf{fma}\left(\color{blue}{xx - zx}, yy, \left(\mathsf{neg}\left(xx\right)\right) \cdot zy\right)\right) \]
    5. Applied rewrites79.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(zy, yx, \mathsf{fma}\left(xx - zx, yy, \left(-xx\right) \cdot zy\right)\right)} \]

    if -1.50000000000000006e-26 < zy < 3.9999999999999998e33

    1. Initial program 92.2%

      \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
    2. Add Preprocessing
    3. Taylor expanded in zy around 0

      \[\leadsto \color{blue}{\left(xx \cdot yy + xy \cdot zx\right) - \left(xy \cdot yx + yy \cdot zx\right)} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\left(xy \cdot zx + xx \cdot yy\right)} - \left(xy \cdot yx + yy \cdot zx\right) \]
      2. associate--l+N/A

        \[\leadsto \color{blue}{xy \cdot zx + \left(xx \cdot yy - \left(xy \cdot yx + yy \cdot zx\right)\right)} \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(xy, zx, xx \cdot yy - \left(xy \cdot yx + yy \cdot zx\right)\right)} \]
      4. sub-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{xx \cdot yy + \left(\mathsf{neg}\left(\left(xy \cdot yx + yy \cdot zx\right)\right)\right)}\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\mathsf{neg}\left(\color{blue}{\left(yy \cdot zx + xy \cdot yx\right)}\right)\right)\right) \]
      6. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \color{blue}{\left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \left(\mathsf{neg}\left(xy \cdot yx\right)\right)\right)}\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \left(\mathsf{neg}\left(\color{blue}{yx \cdot xy}\right)\right)\right)\right) \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \color{blue}{\left(\mathsf{neg}\left(yx\right)\right) \cdot xy}\right)\right) \]
      9. associate-+r+N/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\left(xx \cdot yy + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy}\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \left(\color{blue}{yy \cdot xx} + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \left(yy \cdot xx + \color{blue}{yy \cdot \left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \left(yy \cdot xx + yy \cdot \color{blue}{\left(-1 \cdot zx\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      13. distribute-lft-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{yy \cdot \left(xx + -1 \cdot zx\right)} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      14. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, yy \cdot \left(xx + \color{blue}{\left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      15. sub-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, yy \cdot \color{blue}{\left(xx - zx\right)} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\left(xx - zx\right) \cdot yy} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      17. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\mathsf{fma}\left(xx - zx, yy, \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right)}\right) \]
      18. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \mathsf{fma}\left(\color{blue}{xx - zx}, yy, \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right)\right) \]
    5. Applied rewrites88.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(xy, zx, \mathsf{fma}\left(xx - zx, yy, \left(-yx\right) \cdot xy\right)\right)} \]
    6. Taylor expanded in zy around 0

      \[\leadsto \color{blue}{\left(xx \cdot yy + xy \cdot zx\right) - \left(xy \cdot yx + yy \cdot zx\right)} \]
    7. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{\left(xx \cdot yy + xy \cdot zx\right) + \left(\mathsf{neg}\left(\left(xy \cdot yx + yy \cdot zx\right)\right)\right)} \]
      2. neg-mul-1N/A

        \[\leadsto \left(xx \cdot yy + xy \cdot zx\right) + \color{blue}{-1 \cdot \left(xy \cdot yx + yy \cdot zx\right)} \]
      3. distribute-lft-outN/A

        \[\leadsto \left(xx \cdot yy + xy \cdot zx\right) + \color{blue}{\left(-1 \cdot \left(xy \cdot yx\right) + -1 \cdot \left(yy \cdot zx\right)\right)} \]
      4. +-commutativeN/A

        \[\leadsto \left(xx \cdot yy + xy \cdot zx\right) + \color{blue}{\left(-1 \cdot \left(yy \cdot zx\right) + -1 \cdot \left(xy \cdot yx\right)\right)} \]
      5. associate-+l+N/A

        \[\leadsto \color{blue}{\left(\left(xx \cdot yy + xy \cdot zx\right) + -1 \cdot \left(yy \cdot zx\right)\right) + -1 \cdot \left(xy \cdot yx\right)} \]
      6. +-commutativeN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(yy \cdot zx\right) + \left(xx \cdot yy + xy \cdot zx\right)\right)} + -1 \cdot \left(xy \cdot yx\right) \]
      7. associate-+r+N/A

        \[\leadsto \color{blue}{\left(\left(-1 \cdot \left(yy \cdot zx\right) + xx \cdot yy\right) + xy \cdot zx\right)} + -1 \cdot \left(xy \cdot yx\right) \]
      8. associate-+l+N/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(yy \cdot zx\right) + xx \cdot yy\right) + \left(xy \cdot zx + -1 \cdot \left(xy \cdot yx\right)\right)} \]
      9. +-commutativeN/A

        \[\leadsto \color{blue}{\left(xx \cdot yy + -1 \cdot \left(yy \cdot zx\right)\right)} + \left(xy \cdot zx + -1 \cdot \left(xy \cdot yx\right)\right) \]
      10. mul-1-negN/A

        \[\leadsto \left(xx \cdot yy + \color{blue}{\left(\mathsf{neg}\left(yy \cdot zx\right)\right)}\right) + \left(xy \cdot zx + -1 \cdot \left(xy \cdot yx\right)\right) \]
      11. unsub-negN/A

        \[\leadsto \color{blue}{\left(xx \cdot yy - yy \cdot zx\right)} + \left(xy \cdot zx + -1 \cdot \left(xy \cdot yx\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \left(\color{blue}{yy \cdot xx} - yy \cdot zx\right) + \left(xy \cdot zx + -1 \cdot \left(xy \cdot yx\right)\right) \]
      13. distribute-lft-out--N/A

        \[\leadsto \color{blue}{yy \cdot \left(xx - zx\right)} + \left(xy \cdot zx + -1 \cdot \left(xy \cdot yx\right)\right) \]
      14. mul-1-negN/A

        \[\leadsto yy \cdot \left(xx - zx\right) + \left(xy \cdot zx + \color{blue}{\left(\mathsf{neg}\left(xy \cdot yx\right)\right)}\right) \]
      15. distribute-rgt-neg-inN/A

        \[\leadsto yy \cdot \left(xx - zx\right) + \left(xy \cdot zx + \color{blue}{xy \cdot \left(\mathsf{neg}\left(yx\right)\right)}\right) \]
      16. mul-1-negN/A

        \[\leadsto yy \cdot \left(xx - zx\right) + \left(xy \cdot zx + xy \cdot \color{blue}{\left(-1 \cdot yx\right)}\right) \]
      17. distribute-lft-inN/A

        \[\leadsto yy \cdot \left(xx - zx\right) + \color{blue}{xy \cdot \left(zx + -1 \cdot yx\right)} \]
      18. +-commutativeN/A

        \[\leadsto \color{blue}{xy \cdot \left(zx + -1 \cdot yx\right) + yy \cdot \left(xx - zx\right)} \]
    8. Applied rewrites89.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(zx - yx, xy, \left(xx - zx\right) \cdot yy\right)} \]

    if 3.9999999999999998e33 < zy < 2.4999999999999999e199

    1. Initial program 86.4%

      \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
    2. Add Preprocessing
    3. Taylor expanded in zy around 0

      \[\leadsto \color{blue}{\left(xx \cdot yy + xy \cdot zx\right) - \left(xy \cdot yx + yy \cdot zx\right)} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\left(xy \cdot zx + xx \cdot yy\right)} - \left(xy \cdot yx + yy \cdot zx\right) \]
      2. associate--l+N/A

        \[\leadsto \color{blue}{xy \cdot zx + \left(xx \cdot yy - \left(xy \cdot yx + yy \cdot zx\right)\right)} \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(xy, zx, xx \cdot yy - \left(xy \cdot yx + yy \cdot zx\right)\right)} \]
      4. sub-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{xx \cdot yy + \left(\mathsf{neg}\left(\left(xy \cdot yx + yy \cdot zx\right)\right)\right)}\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\mathsf{neg}\left(\color{blue}{\left(yy \cdot zx + xy \cdot yx\right)}\right)\right)\right) \]
      6. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \color{blue}{\left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \left(\mathsf{neg}\left(xy \cdot yx\right)\right)\right)}\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \left(\mathsf{neg}\left(\color{blue}{yx \cdot xy}\right)\right)\right)\right) \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \color{blue}{\left(\mathsf{neg}\left(yx\right)\right) \cdot xy}\right)\right) \]
      9. associate-+r+N/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\left(xx \cdot yy + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy}\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \left(\color{blue}{yy \cdot xx} + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \left(yy \cdot xx + \color{blue}{yy \cdot \left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \left(yy \cdot xx + yy \cdot \color{blue}{\left(-1 \cdot zx\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      13. distribute-lft-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{yy \cdot \left(xx + -1 \cdot zx\right)} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      14. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, yy \cdot \left(xx + \color{blue}{\left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      15. sub-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, yy \cdot \color{blue}{\left(xx - zx\right)} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\left(xx - zx\right) \cdot yy} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      17. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\mathsf{fma}\left(xx - zx, yy, \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right)}\right) \]
      18. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \mathsf{fma}\left(\color{blue}{xx - zx}, yy, \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right)\right) \]
    5. Applied rewrites60.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(xy, zx, \mathsf{fma}\left(xx - zx, yy, \left(-yx\right) \cdot xy\right)\right)} \]
    6. Taylor expanded in yx around 0

      \[\leadsto \color{blue}{\left(xx \cdot yy + xy \cdot zx\right) - \left(xx \cdot zy + yy \cdot zx\right)} \]
    7. Step-by-step derivation
      1. associate--r+N/A

        \[\leadsto \color{blue}{\left(\left(xx \cdot yy + xy \cdot zx\right) - xx \cdot zy\right) - yy \cdot zx} \]
      2. sub-negN/A

        \[\leadsto \color{blue}{\left(\left(xx \cdot yy + xy \cdot zx\right) + \left(\mathsf{neg}\left(xx \cdot zy\right)\right)\right)} - yy \cdot zx \]
      3. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(xx \cdot zy\right)\right) + \left(xx \cdot yy + xy \cdot zx\right)\right)} - yy \cdot zx \]
      4. associate-+r+N/A

        \[\leadsto \color{blue}{\left(\left(\left(\mathsf{neg}\left(xx \cdot zy\right)\right) + xx \cdot yy\right) + xy \cdot zx\right)} - yy \cdot zx \]
      5. associate--l+N/A

        \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(xx \cdot zy\right)\right) + xx \cdot yy\right) + \left(xy \cdot zx - yy \cdot zx\right)} \]
      6. +-commutativeN/A

        \[\leadsto \color{blue}{\left(xx \cdot yy + \left(\mathsf{neg}\left(xx \cdot zy\right)\right)\right)} + \left(xy \cdot zx - yy \cdot zx\right) \]
      7. unsub-negN/A

        \[\leadsto \color{blue}{\left(xx \cdot yy - xx \cdot zy\right)} + \left(xy \cdot zx - yy \cdot zx\right) \]
      8. distribute-lft-out--N/A

        \[\leadsto \color{blue}{xx \cdot \left(yy - zy\right)} + \left(xy \cdot zx - yy \cdot zx\right) \]
      9. *-commutativeN/A

        \[\leadsto \color{blue}{\left(yy - zy\right) \cdot xx} + \left(xy \cdot zx - yy \cdot zx\right) \]
      10. distribute-rgt-out--N/A

        \[\leadsto \left(yy - zy\right) \cdot xx + \color{blue}{zx \cdot \left(xy - yy\right)} \]
      11. sub-negN/A

        \[\leadsto \left(yy - zy\right) \cdot xx + zx \cdot \color{blue}{\left(xy + \left(\mathsf{neg}\left(yy\right)\right)\right)} \]
      12. mul-1-negN/A

        \[\leadsto \left(yy - zy\right) \cdot xx + zx \cdot \left(xy + \color{blue}{-1 \cdot yy}\right) \]
      13. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(yy - zy, xx, zx \cdot \left(xy + -1 \cdot yy\right)\right)} \]
      14. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{yy - zy}, xx, zx \cdot \left(xy + -1 \cdot yy\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(yy - zy, xx, \color{blue}{\left(xy + -1 \cdot yy\right) \cdot zx}\right) \]
      16. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(yy - zy, xx, \color{blue}{\left(xy + -1 \cdot yy\right) \cdot zx}\right) \]
      17. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(yy - zy, xx, \left(xy + \color{blue}{\left(\mathsf{neg}\left(yy\right)\right)}\right) \cdot zx\right) \]
      18. sub-negN/A

        \[\leadsto \mathsf{fma}\left(yy - zy, xx, \color{blue}{\left(xy - yy\right)} \cdot zx\right) \]
      19. lower--.f6487.1

        \[\leadsto \mathsf{fma}\left(yy - zy, xx, \color{blue}{\left(xy - yy\right)} \cdot zx\right) \]
    8. Applied rewrites87.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(yy - zy, xx, \left(xy - yy\right) \cdot zx\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 3: 78.0% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(zy - xy\right) \cdot yx\\ \mathbf{if}\;yx \leq -2.1 \cdot 10^{+188}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;yx \leq -6 \cdot 10^{-111}:\\ \;\;\;\;\mathsf{fma}\left(zx - yx, xy, \left(xx - zx\right) \cdot yy\right)\\ \mathbf{elif}\;yx \leq 2.2 \cdot 10^{+167}:\\ \;\;\;\;\mathsf{fma}\left(yy - zy, xx, \left(xy - yy\right) \cdot zx\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (xx yy yx zy zx xy)
 :precision binary64
 (let* ((t_0 (* (- zy xy) yx)))
   (if (<= yx -2.1e+188)
     t_0
     (if (<= yx -6e-111)
       (fma (- zx yx) xy (* (- xx zx) yy))
       (if (<= yx 2.2e+167) (fma (- yy zy) xx (* (- xy yy) zx)) t_0)))))
double code(double xx, double yy, double yx, double zy, double zx, double xy) {
	double t_0 = (zy - xy) * yx;
	double tmp;
	if (yx <= -2.1e+188) {
		tmp = t_0;
	} else if (yx <= -6e-111) {
		tmp = fma((zx - yx), xy, ((xx - zx) * yy));
	} else if (yx <= 2.2e+167) {
		tmp = fma((yy - zy), xx, ((xy - yy) * zx));
	} else {
		tmp = t_0;
	}
	return tmp;
}
function code(xx, yy, yx, zy, zx, xy)
	t_0 = Float64(Float64(zy - xy) * yx)
	tmp = 0.0
	if (yx <= -2.1e+188)
		tmp = t_0;
	elseif (yx <= -6e-111)
		tmp = fma(Float64(zx - yx), xy, Float64(Float64(xx - zx) * yy));
	elseif (yx <= 2.2e+167)
		tmp = fma(Float64(yy - zy), xx, Float64(Float64(xy - yy) * zx));
	else
		tmp = t_0;
	end
	return tmp
end
code[xx_, yy_, yx_, zy_, zx_, xy_] := Block[{t$95$0 = N[(N[(zy - xy), $MachinePrecision] * yx), $MachinePrecision]}, If[LessEqual[yx, -2.1e+188], t$95$0, If[LessEqual[yx, -6e-111], N[(N[(zx - yx), $MachinePrecision] * xy + N[(N[(xx - zx), $MachinePrecision] * yy), $MachinePrecision]), $MachinePrecision], If[LessEqual[yx, 2.2e+167], N[(N[(yy - zy), $MachinePrecision] * xx + N[(N[(xy - yy), $MachinePrecision] * zx), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(zy - xy\right) \cdot yx\\
\mathbf{if}\;yx \leq -2.1 \cdot 10^{+188}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;yx \leq -6 \cdot 10^{-111}:\\
\;\;\;\;\mathsf{fma}\left(zx - yx, xy, \left(xx - zx\right) \cdot yy\right)\\

\mathbf{elif}\;yx \leq 2.2 \cdot 10^{+167}:\\
\;\;\;\;\mathsf{fma}\left(yy - zy, xx, \left(xy - yy\right) \cdot zx\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if yx < -2.09999999999999986e188 or 2.20000000000000003e167 < yx

    1. Initial program 72.3%

      \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
    2. Add Preprocessing
    3. Taylor expanded in yx around inf

      \[\leadsto \color{blue}{yx \cdot \left(zy - xy\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]
      3. lower--.f6487.7

        \[\leadsto \color{blue}{\left(zy - xy\right)} \cdot yx \]
    5. Applied rewrites87.7%

      \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]

    if -2.09999999999999986e188 < yx < -6.00000000000000016e-111

    1. Initial program 85.4%

      \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
    2. Add Preprocessing
    3. Taylor expanded in zy around 0

      \[\leadsto \color{blue}{\left(xx \cdot yy + xy \cdot zx\right) - \left(xy \cdot yx + yy \cdot zx\right)} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\left(xy \cdot zx + xx \cdot yy\right)} - \left(xy \cdot yx + yy \cdot zx\right) \]
      2. associate--l+N/A

        \[\leadsto \color{blue}{xy \cdot zx + \left(xx \cdot yy - \left(xy \cdot yx + yy \cdot zx\right)\right)} \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(xy, zx, xx \cdot yy - \left(xy \cdot yx + yy \cdot zx\right)\right)} \]
      4. sub-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{xx \cdot yy + \left(\mathsf{neg}\left(\left(xy \cdot yx + yy \cdot zx\right)\right)\right)}\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\mathsf{neg}\left(\color{blue}{\left(yy \cdot zx + xy \cdot yx\right)}\right)\right)\right) \]
      6. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \color{blue}{\left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \left(\mathsf{neg}\left(xy \cdot yx\right)\right)\right)}\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \left(\mathsf{neg}\left(\color{blue}{yx \cdot xy}\right)\right)\right)\right) \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \color{blue}{\left(\mathsf{neg}\left(yx\right)\right) \cdot xy}\right)\right) \]
      9. associate-+r+N/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\left(xx \cdot yy + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy}\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \left(\color{blue}{yy \cdot xx} + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \left(yy \cdot xx + \color{blue}{yy \cdot \left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \left(yy \cdot xx + yy \cdot \color{blue}{\left(-1 \cdot zx\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      13. distribute-lft-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{yy \cdot \left(xx + -1 \cdot zx\right)} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      14. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, yy \cdot \left(xx + \color{blue}{\left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      15. sub-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, yy \cdot \color{blue}{\left(xx - zx\right)} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\left(xx - zx\right) \cdot yy} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      17. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\mathsf{fma}\left(xx - zx, yy, \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right)}\right) \]
      18. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \mathsf{fma}\left(\color{blue}{xx - zx}, yy, \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right)\right) \]
    5. Applied rewrites76.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(xy, zx, \mathsf{fma}\left(xx - zx, yy, \left(-yx\right) \cdot xy\right)\right)} \]
    6. Taylor expanded in zy around 0

      \[\leadsto \color{blue}{\left(xx \cdot yy + xy \cdot zx\right) - \left(xy \cdot yx + yy \cdot zx\right)} \]
    7. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{\left(xx \cdot yy + xy \cdot zx\right) + \left(\mathsf{neg}\left(\left(xy \cdot yx + yy \cdot zx\right)\right)\right)} \]
      2. neg-mul-1N/A

        \[\leadsto \left(xx \cdot yy + xy \cdot zx\right) + \color{blue}{-1 \cdot \left(xy \cdot yx + yy \cdot zx\right)} \]
      3. distribute-lft-outN/A

        \[\leadsto \left(xx \cdot yy + xy \cdot zx\right) + \color{blue}{\left(-1 \cdot \left(xy \cdot yx\right) + -1 \cdot \left(yy \cdot zx\right)\right)} \]
      4. +-commutativeN/A

        \[\leadsto \left(xx \cdot yy + xy \cdot zx\right) + \color{blue}{\left(-1 \cdot \left(yy \cdot zx\right) + -1 \cdot \left(xy \cdot yx\right)\right)} \]
      5. associate-+l+N/A

        \[\leadsto \color{blue}{\left(\left(xx \cdot yy + xy \cdot zx\right) + -1 \cdot \left(yy \cdot zx\right)\right) + -1 \cdot \left(xy \cdot yx\right)} \]
      6. +-commutativeN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(yy \cdot zx\right) + \left(xx \cdot yy + xy \cdot zx\right)\right)} + -1 \cdot \left(xy \cdot yx\right) \]
      7. associate-+r+N/A

        \[\leadsto \color{blue}{\left(\left(-1 \cdot \left(yy \cdot zx\right) + xx \cdot yy\right) + xy \cdot zx\right)} + -1 \cdot \left(xy \cdot yx\right) \]
      8. associate-+l+N/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(yy \cdot zx\right) + xx \cdot yy\right) + \left(xy \cdot zx + -1 \cdot \left(xy \cdot yx\right)\right)} \]
      9. +-commutativeN/A

        \[\leadsto \color{blue}{\left(xx \cdot yy + -1 \cdot \left(yy \cdot zx\right)\right)} + \left(xy \cdot zx + -1 \cdot \left(xy \cdot yx\right)\right) \]
      10. mul-1-negN/A

        \[\leadsto \left(xx \cdot yy + \color{blue}{\left(\mathsf{neg}\left(yy \cdot zx\right)\right)}\right) + \left(xy \cdot zx + -1 \cdot \left(xy \cdot yx\right)\right) \]
      11. unsub-negN/A

        \[\leadsto \color{blue}{\left(xx \cdot yy - yy \cdot zx\right)} + \left(xy \cdot zx + -1 \cdot \left(xy \cdot yx\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \left(\color{blue}{yy \cdot xx} - yy \cdot zx\right) + \left(xy \cdot zx + -1 \cdot \left(xy \cdot yx\right)\right) \]
      13. distribute-lft-out--N/A

        \[\leadsto \color{blue}{yy \cdot \left(xx - zx\right)} + \left(xy \cdot zx + -1 \cdot \left(xy \cdot yx\right)\right) \]
      14. mul-1-negN/A

        \[\leadsto yy \cdot \left(xx - zx\right) + \left(xy \cdot zx + \color{blue}{\left(\mathsf{neg}\left(xy \cdot yx\right)\right)}\right) \]
      15. distribute-rgt-neg-inN/A

        \[\leadsto yy \cdot \left(xx - zx\right) + \left(xy \cdot zx + \color{blue}{xy \cdot \left(\mathsf{neg}\left(yx\right)\right)}\right) \]
      16. mul-1-negN/A

        \[\leadsto yy \cdot \left(xx - zx\right) + \left(xy \cdot zx + xy \cdot \color{blue}{\left(-1 \cdot yx\right)}\right) \]
      17. distribute-lft-inN/A

        \[\leadsto yy \cdot \left(xx - zx\right) + \color{blue}{xy \cdot \left(zx + -1 \cdot yx\right)} \]
      18. +-commutativeN/A

        \[\leadsto \color{blue}{xy \cdot \left(zx + -1 \cdot yx\right) + yy \cdot \left(xx - zx\right)} \]
    8. Applied rewrites79.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(zx - yx, xy, \left(xx - zx\right) \cdot yy\right)} \]

    if -6.00000000000000016e-111 < yx < 2.20000000000000003e167

    1. Initial program 87.0%

      \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
    2. Add Preprocessing
    3. Taylor expanded in zy around 0

      \[\leadsto \color{blue}{\left(xx \cdot yy + xy \cdot zx\right) - \left(xy \cdot yx + yy \cdot zx\right)} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{\left(xy \cdot zx + xx \cdot yy\right)} - \left(xy \cdot yx + yy \cdot zx\right) \]
      2. associate--l+N/A

        \[\leadsto \color{blue}{xy \cdot zx + \left(xx \cdot yy - \left(xy \cdot yx + yy \cdot zx\right)\right)} \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(xy, zx, xx \cdot yy - \left(xy \cdot yx + yy \cdot zx\right)\right)} \]
      4. sub-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{xx \cdot yy + \left(\mathsf{neg}\left(\left(xy \cdot yx + yy \cdot zx\right)\right)\right)}\right) \]
      5. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\mathsf{neg}\left(\color{blue}{\left(yy \cdot zx + xy \cdot yx\right)}\right)\right)\right) \]
      6. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \color{blue}{\left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \left(\mathsf{neg}\left(xy \cdot yx\right)\right)\right)}\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \left(\mathsf{neg}\left(\color{blue}{yx \cdot xy}\right)\right)\right)\right) \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \color{blue}{\left(\mathsf{neg}\left(yx\right)\right) \cdot xy}\right)\right) \]
      9. associate-+r+N/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\left(xx \cdot yy + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy}\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \left(\color{blue}{yy \cdot xx} + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      11. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \left(yy \cdot xx + \color{blue}{yy \cdot \left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \left(yy \cdot xx + yy \cdot \color{blue}{\left(-1 \cdot zx\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      13. distribute-lft-inN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{yy \cdot \left(xx + -1 \cdot zx\right)} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      14. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, yy \cdot \left(xx + \color{blue}{\left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      15. sub-negN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, yy \cdot \color{blue}{\left(xx - zx\right)} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\left(xx - zx\right) \cdot yy} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
      17. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\mathsf{fma}\left(xx - zx, yy, \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right)}\right) \]
      18. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(xy, zx, \mathsf{fma}\left(\color{blue}{xx - zx}, yy, \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right)\right) \]
    5. Applied rewrites66.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(xy, zx, \mathsf{fma}\left(xx - zx, yy, \left(-yx\right) \cdot xy\right)\right)} \]
    6. Taylor expanded in yx around 0

      \[\leadsto \color{blue}{\left(xx \cdot yy + xy \cdot zx\right) - \left(xx \cdot zy + yy \cdot zx\right)} \]
    7. Step-by-step derivation
      1. associate--r+N/A

        \[\leadsto \color{blue}{\left(\left(xx \cdot yy + xy \cdot zx\right) - xx \cdot zy\right) - yy \cdot zx} \]
      2. sub-negN/A

        \[\leadsto \color{blue}{\left(\left(xx \cdot yy + xy \cdot zx\right) + \left(\mathsf{neg}\left(xx \cdot zy\right)\right)\right)} - yy \cdot zx \]
      3. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(xx \cdot zy\right)\right) + \left(xx \cdot yy + xy \cdot zx\right)\right)} - yy \cdot zx \]
      4. associate-+r+N/A

        \[\leadsto \color{blue}{\left(\left(\left(\mathsf{neg}\left(xx \cdot zy\right)\right) + xx \cdot yy\right) + xy \cdot zx\right)} - yy \cdot zx \]
      5. associate--l+N/A

        \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(xx \cdot zy\right)\right) + xx \cdot yy\right) + \left(xy \cdot zx - yy \cdot zx\right)} \]
      6. +-commutativeN/A

        \[\leadsto \color{blue}{\left(xx \cdot yy + \left(\mathsf{neg}\left(xx \cdot zy\right)\right)\right)} + \left(xy \cdot zx - yy \cdot zx\right) \]
      7. unsub-negN/A

        \[\leadsto \color{blue}{\left(xx \cdot yy - xx \cdot zy\right)} + \left(xy \cdot zx - yy \cdot zx\right) \]
      8. distribute-lft-out--N/A

        \[\leadsto \color{blue}{xx \cdot \left(yy - zy\right)} + \left(xy \cdot zx - yy \cdot zx\right) \]
      9. *-commutativeN/A

        \[\leadsto \color{blue}{\left(yy - zy\right) \cdot xx} + \left(xy \cdot zx - yy \cdot zx\right) \]
      10. distribute-rgt-out--N/A

        \[\leadsto \left(yy - zy\right) \cdot xx + \color{blue}{zx \cdot \left(xy - yy\right)} \]
      11. sub-negN/A

        \[\leadsto \left(yy - zy\right) \cdot xx + zx \cdot \color{blue}{\left(xy + \left(\mathsf{neg}\left(yy\right)\right)\right)} \]
      12. mul-1-negN/A

        \[\leadsto \left(yy - zy\right) \cdot xx + zx \cdot \left(xy + \color{blue}{-1 \cdot yy}\right) \]
      13. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(yy - zy, xx, zx \cdot \left(xy + -1 \cdot yy\right)\right)} \]
      14. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{yy - zy}, xx, zx \cdot \left(xy + -1 \cdot yy\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(yy - zy, xx, \color{blue}{\left(xy + -1 \cdot yy\right) \cdot zx}\right) \]
      16. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(yy - zy, xx, \color{blue}{\left(xy + -1 \cdot yy\right) \cdot zx}\right) \]
      17. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(yy - zy, xx, \left(xy + \color{blue}{\left(\mathsf{neg}\left(yy\right)\right)}\right) \cdot zx\right) \]
      18. sub-negN/A

        \[\leadsto \mathsf{fma}\left(yy - zy, xx, \color{blue}{\left(xy - yy\right)} \cdot zx\right) \]
      19. lower--.f6485.2

        \[\leadsto \mathsf{fma}\left(yy - zy, xx, \color{blue}{\left(xy - yy\right)} \cdot zx\right) \]
    8. Applied rewrites85.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(yy - zy, xx, \left(xy - yy\right) \cdot zx\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 4: 52.8% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(zx - yx\right) \cdot xy\\ \mathbf{if}\;xy \leq -1.85 \cdot 10^{+60}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;xy \leq -6.2 \cdot 10^{-215}:\\ \;\;\;\;\left(xx - zx\right) \cdot yy\\ \mathbf{elif}\;xy \leq -5.2 \cdot 10^{-251}:\\ \;\;\;\;zy \cdot yx\\ \mathbf{elif}\;xy \leq 7 \cdot 10^{+37}:\\ \;\;\;\;\left(yy - zy\right) \cdot xx\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (xx yy yx zy zx xy)
 :precision binary64
 (let* ((t_0 (* (- zx yx) xy)))
   (if (<= xy -1.85e+60)
     t_0
     (if (<= xy -6.2e-215)
       (* (- xx zx) yy)
       (if (<= xy -5.2e-251)
         (* zy yx)
         (if (<= xy 7e+37) (* (- yy zy) xx) t_0))))))
double code(double xx, double yy, double yx, double zy, double zx, double xy) {
	double t_0 = (zx - yx) * xy;
	double tmp;
	if (xy <= -1.85e+60) {
		tmp = t_0;
	} else if (xy <= -6.2e-215) {
		tmp = (xx - zx) * yy;
	} else if (xy <= -5.2e-251) {
		tmp = zy * yx;
	} else if (xy <= 7e+37) {
		tmp = (yy - zy) * xx;
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(xx, yy, yx, zy, zx, xy)
    real(8), intent (in) :: xx
    real(8), intent (in) :: yy
    real(8), intent (in) :: yx
    real(8), intent (in) :: zy
    real(8), intent (in) :: zx
    real(8), intent (in) :: xy
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (zx - yx) * xy
    if (xy <= (-1.85d+60)) then
        tmp = t_0
    else if (xy <= (-6.2d-215)) then
        tmp = (xx - zx) * yy
    else if (xy <= (-5.2d-251)) then
        tmp = zy * yx
    else if (xy <= 7d+37) then
        tmp = (yy - zy) * xx
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double xx, double yy, double yx, double zy, double zx, double xy) {
	double t_0 = (zx - yx) * xy;
	double tmp;
	if (xy <= -1.85e+60) {
		tmp = t_0;
	} else if (xy <= -6.2e-215) {
		tmp = (xx - zx) * yy;
	} else if (xy <= -5.2e-251) {
		tmp = zy * yx;
	} else if (xy <= 7e+37) {
		tmp = (yy - zy) * xx;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(xx, yy, yx, zy, zx, xy):
	t_0 = (zx - yx) * xy
	tmp = 0
	if xy <= -1.85e+60:
		tmp = t_0
	elif xy <= -6.2e-215:
		tmp = (xx - zx) * yy
	elif xy <= -5.2e-251:
		tmp = zy * yx
	elif xy <= 7e+37:
		tmp = (yy - zy) * xx
	else:
		tmp = t_0
	return tmp
function code(xx, yy, yx, zy, zx, xy)
	t_0 = Float64(Float64(zx - yx) * xy)
	tmp = 0.0
	if (xy <= -1.85e+60)
		tmp = t_0;
	elseif (xy <= -6.2e-215)
		tmp = Float64(Float64(xx - zx) * yy);
	elseif (xy <= -5.2e-251)
		tmp = Float64(zy * yx);
	elseif (xy <= 7e+37)
		tmp = Float64(Float64(yy - zy) * xx);
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(xx, yy, yx, zy, zx, xy)
	t_0 = (zx - yx) * xy;
	tmp = 0.0;
	if (xy <= -1.85e+60)
		tmp = t_0;
	elseif (xy <= -6.2e-215)
		tmp = (xx - zx) * yy;
	elseif (xy <= -5.2e-251)
		tmp = zy * yx;
	elseif (xy <= 7e+37)
		tmp = (yy - zy) * xx;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[xx_, yy_, yx_, zy_, zx_, xy_] := Block[{t$95$0 = N[(N[(zx - yx), $MachinePrecision] * xy), $MachinePrecision]}, If[LessEqual[xy, -1.85e+60], t$95$0, If[LessEqual[xy, -6.2e-215], N[(N[(xx - zx), $MachinePrecision] * yy), $MachinePrecision], If[LessEqual[xy, -5.2e-251], N[(zy * yx), $MachinePrecision], If[LessEqual[xy, 7e+37], N[(N[(yy - zy), $MachinePrecision] * xx), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(zx - yx\right) \cdot xy\\
\mathbf{if}\;xy \leq -1.85 \cdot 10^{+60}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;xy \leq -6.2 \cdot 10^{-215}:\\
\;\;\;\;\left(xx - zx\right) \cdot yy\\

\mathbf{elif}\;xy \leq -5.2 \cdot 10^{-251}:\\
\;\;\;\;zy \cdot yx\\

\mathbf{elif}\;xy \leq 7 \cdot 10^{+37}:\\
\;\;\;\;\left(yy - zy\right) \cdot xx\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if xy < -1.84999999999999994e60 or 7e37 < xy

    1. Initial program 77.7%

      \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
    2. Add Preprocessing
    3. Taylor expanded in xy around inf

      \[\leadsto \color{blue}{xy \cdot \left(zx - yx\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(zx - yx\right) \cdot xy} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(zx - yx\right) \cdot xy} \]
      3. lower--.f6470.7

        \[\leadsto \color{blue}{\left(zx - yx\right)} \cdot xy \]
    5. Applied rewrites70.7%

      \[\leadsto \color{blue}{\left(zx - yx\right) \cdot xy} \]

    if -1.84999999999999994e60 < xy < -6.19999999999999987e-215

    1. Initial program 91.5%

      \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
    2. Add Preprocessing
    3. Taylor expanded in yy around inf

      \[\leadsto \color{blue}{yy \cdot \left(xx - zx\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(xx - zx\right) \cdot yy} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(xx - zx\right) \cdot yy} \]
      3. lower--.f6452.6

        \[\leadsto \color{blue}{\left(xx - zx\right)} \cdot yy \]
    5. Applied rewrites52.6%

      \[\leadsto \color{blue}{\left(xx - zx\right) \cdot yy} \]

    if -6.19999999999999987e-215 < xy < -5.1999999999999998e-251

    1. Initial program 85.7%

      \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
    2. Add Preprocessing
    3. Taylor expanded in yx around inf

      \[\leadsto \color{blue}{yx \cdot \left(zy - xy\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]
      3. lower--.f64100.0

        \[\leadsto \color{blue}{\left(zy - xy\right)} \cdot yx \]
    5. Applied rewrites100.0%

      \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]
    6. Taylor expanded in zy around inf

      \[\leadsto yx \cdot \color{blue}{zy} \]
    7. Step-by-step derivation
      1. Applied rewrites100.0%

        \[\leadsto zy \cdot \color{blue}{yx} \]

      if -5.1999999999999998e-251 < xy < 7e37

      1. Initial program 86.6%

        \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
      2. Add Preprocessing
      3. Taylor expanded in xx around inf

        \[\leadsto \color{blue}{xx \cdot \left(yy - zy\right)} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\left(yy - zy\right) \cdot xx} \]
        2. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(yy - zy\right) \cdot xx} \]
        3. lower--.f6461.2

          \[\leadsto \color{blue}{\left(yy - zy\right)} \cdot xx \]
      5. Applied rewrites61.2%

        \[\leadsto \color{blue}{\left(yy - zy\right) \cdot xx} \]
    8. Recombined 4 regimes into one program.
    9. Add Preprocessing

    Alternative 5: 29.8% accurate, 1.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;yy \leq -1.75 \cdot 10^{+161}:\\ \;\;\;\;yy \cdot xx\\ \mathbf{elif}\;yy \leq -9.5 \cdot 10^{-77}:\\ \;\;\;\;zy \cdot yx\\ \mathbf{elif}\;yy \leq 1.6 \cdot 10^{+28}:\\ \;\;\;\;\left(-zy\right) \cdot xx\\ \mathbf{elif}\;yy \leq 3.8 \cdot 10^{+147}:\\ \;\;\;\;\left(-zx\right) \cdot yy\\ \mathbf{else}:\\ \;\;\;\;yy \cdot xx\\ \end{array} \end{array} \]
    (FPCore (xx yy yx zy zx xy)
     :precision binary64
     (if (<= yy -1.75e+161)
       (* yy xx)
       (if (<= yy -9.5e-77)
         (* zy yx)
         (if (<= yy 1.6e+28)
           (* (- zy) xx)
           (if (<= yy 3.8e+147) (* (- zx) yy) (* yy xx))))))
    double code(double xx, double yy, double yx, double zy, double zx, double xy) {
    	double tmp;
    	if (yy <= -1.75e+161) {
    		tmp = yy * xx;
    	} else if (yy <= -9.5e-77) {
    		tmp = zy * yx;
    	} else if (yy <= 1.6e+28) {
    		tmp = -zy * xx;
    	} else if (yy <= 3.8e+147) {
    		tmp = -zx * yy;
    	} else {
    		tmp = yy * xx;
    	}
    	return tmp;
    }
    
    real(8) function code(xx, yy, yx, zy, zx, xy)
        real(8), intent (in) :: xx
        real(8), intent (in) :: yy
        real(8), intent (in) :: yx
        real(8), intent (in) :: zy
        real(8), intent (in) :: zx
        real(8), intent (in) :: xy
        real(8) :: tmp
        if (yy <= (-1.75d+161)) then
            tmp = yy * xx
        else if (yy <= (-9.5d-77)) then
            tmp = zy * yx
        else if (yy <= 1.6d+28) then
            tmp = -zy * xx
        else if (yy <= 3.8d+147) then
            tmp = -zx * yy
        else
            tmp = yy * xx
        end if
        code = tmp
    end function
    
    public static double code(double xx, double yy, double yx, double zy, double zx, double xy) {
    	double tmp;
    	if (yy <= -1.75e+161) {
    		tmp = yy * xx;
    	} else if (yy <= -9.5e-77) {
    		tmp = zy * yx;
    	} else if (yy <= 1.6e+28) {
    		tmp = -zy * xx;
    	} else if (yy <= 3.8e+147) {
    		tmp = -zx * yy;
    	} else {
    		tmp = yy * xx;
    	}
    	return tmp;
    }
    
    def code(xx, yy, yx, zy, zx, xy):
    	tmp = 0
    	if yy <= -1.75e+161:
    		tmp = yy * xx
    	elif yy <= -9.5e-77:
    		tmp = zy * yx
    	elif yy <= 1.6e+28:
    		tmp = -zy * xx
    	elif yy <= 3.8e+147:
    		tmp = -zx * yy
    	else:
    		tmp = yy * xx
    	return tmp
    
    function code(xx, yy, yx, zy, zx, xy)
    	tmp = 0.0
    	if (yy <= -1.75e+161)
    		tmp = Float64(yy * xx);
    	elseif (yy <= -9.5e-77)
    		tmp = Float64(zy * yx);
    	elseif (yy <= 1.6e+28)
    		tmp = Float64(Float64(-zy) * xx);
    	elseif (yy <= 3.8e+147)
    		tmp = Float64(Float64(-zx) * yy);
    	else
    		tmp = Float64(yy * xx);
    	end
    	return tmp
    end
    
    function tmp_2 = code(xx, yy, yx, zy, zx, xy)
    	tmp = 0.0;
    	if (yy <= -1.75e+161)
    		tmp = yy * xx;
    	elseif (yy <= -9.5e-77)
    		tmp = zy * yx;
    	elseif (yy <= 1.6e+28)
    		tmp = -zy * xx;
    	elseif (yy <= 3.8e+147)
    		tmp = -zx * yy;
    	else
    		tmp = yy * xx;
    	end
    	tmp_2 = tmp;
    end
    
    code[xx_, yy_, yx_, zy_, zx_, xy_] := If[LessEqual[yy, -1.75e+161], N[(yy * xx), $MachinePrecision], If[LessEqual[yy, -9.5e-77], N[(zy * yx), $MachinePrecision], If[LessEqual[yy, 1.6e+28], N[((-zy) * xx), $MachinePrecision], If[LessEqual[yy, 3.8e+147], N[((-zx) * yy), $MachinePrecision], N[(yy * xx), $MachinePrecision]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;yy \leq -1.75 \cdot 10^{+161}:\\
    \;\;\;\;yy \cdot xx\\
    
    \mathbf{elif}\;yy \leq -9.5 \cdot 10^{-77}:\\
    \;\;\;\;zy \cdot yx\\
    
    \mathbf{elif}\;yy \leq 1.6 \cdot 10^{+28}:\\
    \;\;\;\;\left(-zy\right) \cdot xx\\
    
    \mathbf{elif}\;yy \leq 3.8 \cdot 10^{+147}:\\
    \;\;\;\;\left(-zx\right) \cdot yy\\
    
    \mathbf{else}:\\
    \;\;\;\;yy \cdot xx\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if yy < -1.74999999999999994e161 or 3.7999999999999997e147 < yy

      1. Initial program 69.9%

        \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
      2. Add Preprocessing
      3. Taylor expanded in zy around 0

        \[\leadsto \color{blue}{\left(xx \cdot yy + xy \cdot zx\right) - \left(xy \cdot yx + yy \cdot zx\right)} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{\left(xy \cdot zx + xx \cdot yy\right)} - \left(xy \cdot yx + yy \cdot zx\right) \]
        2. associate--l+N/A

          \[\leadsto \color{blue}{xy \cdot zx + \left(xx \cdot yy - \left(xy \cdot yx + yy \cdot zx\right)\right)} \]
        3. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(xy, zx, xx \cdot yy - \left(xy \cdot yx + yy \cdot zx\right)\right)} \]
        4. sub-negN/A

          \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{xx \cdot yy + \left(\mathsf{neg}\left(\left(xy \cdot yx + yy \cdot zx\right)\right)\right)}\right) \]
        5. +-commutativeN/A

          \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\mathsf{neg}\left(\color{blue}{\left(yy \cdot zx + xy \cdot yx\right)}\right)\right)\right) \]
        6. distribute-neg-inN/A

          \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \color{blue}{\left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \left(\mathsf{neg}\left(xy \cdot yx\right)\right)\right)}\right) \]
        7. *-commutativeN/A

          \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \left(\mathsf{neg}\left(\color{blue}{yx \cdot xy}\right)\right)\right)\right) \]
        8. distribute-lft-neg-inN/A

          \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \color{blue}{\left(\mathsf{neg}\left(yx\right)\right) \cdot xy}\right)\right) \]
        9. associate-+r+N/A

          \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\left(xx \cdot yy + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy}\right) \]
        10. *-commutativeN/A

          \[\leadsto \mathsf{fma}\left(xy, zx, \left(\color{blue}{yy \cdot xx} + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
        11. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{fma}\left(xy, zx, \left(yy \cdot xx + \color{blue}{yy \cdot \left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
        12. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(xy, zx, \left(yy \cdot xx + yy \cdot \color{blue}{\left(-1 \cdot zx\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
        13. distribute-lft-inN/A

          \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{yy \cdot \left(xx + -1 \cdot zx\right)} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
        14. mul-1-negN/A

          \[\leadsto \mathsf{fma}\left(xy, zx, yy \cdot \left(xx + \color{blue}{\left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
        15. sub-negN/A

          \[\leadsto \mathsf{fma}\left(xy, zx, yy \cdot \color{blue}{\left(xx - zx\right)} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
        16. *-commutativeN/A

          \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\left(xx - zx\right) \cdot yy} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
        17. lower-fma.f64N/A

          \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\mathsf{fma}\left(xx - zx, yy, \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right)}\right) \]
        18. lower--.f64N/A

          \[\leadsto \mathsf{fma}\left(xy, zx, \mathsf{fma}\left(\color{blue}{xx - zx}, yy, \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right)\right) \]
      5. Applied rewrites85.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(xy, zx, \mathsf{fma}\left(xx - zx, yy, \left(-yx\right) \cdot xy\right)\right)} \]
      6. Taylor expanded in xx around inf

        \[\leadsto xx \cdot \color{blue}{yy} \]
      7. Step-by-step derivation
        1. Applied rewrites55.3%

          \[\leadsto yy \cdot \color{blue}{xx} \]

        if -1.74999999999999994e161 < yy < -9.5000000000000005e-77

        1. Initial program 88.3%

          \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
        2. Add Preprocessing
        3. Taylor expanded in yx around inf

          \[\leadsto \color{blue}{yx \cdot \left(zy - xy\right)} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]
          2. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]
          3. lower--.f6445.0

            \[\leadsto \color{blue}{\left(zy - xy\right)} \cdot yx \]
        5. Applied rewrites45.0%

          \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]
        6. Taylor expanded in zy around inf

          \[\leadsto yx \cdot \color{blue}{zy} \]
        7. Step-by-step derivation
          1. Applied rewrites28.5%

            \[\leadsto zy \cdot \color{blue}{yx} \]

          if -9.5000000000000005e-77 < yy < 1.6e28

          1. Initial program 91.8%

            \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
          2. Add Preprocessing
          3. Taylor expanded in xx around inf

            \[\leadsto \color{blue}{xx \cdot \left(yy - zy\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\left(yy - zy\right) \cdot xx} \]
            2. lower-*.f64N/A

              \[\leadsto \color{blue}{\left(yy - zy\right) \cdot xx} \]
            3. lower--.f6438.6

              \[\leadsto \color{blue}{\left(yy - zy\right)} \cdot xx \]
          5. Applied rewrites38.6%

            \[\leadsto \color{blue}{\left(yy - zy\right) \cdot xx} \]
          6. Taylor expanded in yy around 0

            \[\leadsto \left(-1 \cdot zy\right) \cdot xx \]
          7. Step-by-step derivation
            1. Applied rewrites33.1%

              \[\leadsto \left(-zy\right) \cdot xx \]

            if 1.6e28 < yy < 3.7999999999999997e147

            1. Initial program 77.8%

              \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
            2. Add Preprocessing
            3. Taylor expanded in yy around inf

              \[\leadsto \color{blue}{yy \cdot \left(xx - zx\right)} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \color{blue}{\left(xx - zx\right) \cdot yy} \]
              2. lower-*.f64N/A

                \[\leadsto \color{blue}{\left(xx - zx\right) \cdot yy} \]
              3. lower--.f6461.7

                \[\leadsto \color{blue}{\left(xx - zx\right)} \cdot yy \]
            5. Applied rewrites61.7%

              \[\leadsto \color{blue}{\left(xx - zx\right) \cdot yy} \]
            6. Taylor expanded in xx around 0

              \[\leadsto \left(-1 \cdot zx\right) \cdot yy \]
            7. Step-by-step derivation
              1. Applied rewrites45.1%

                \[\leadsto \left(-zx\right) \cdot yy \]
            8. Recombined 4 regimes into one program.
            9. Add Preprocessing

            Alternative 6: 77.7% accurate, 1.5× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;yx \leq -1.7 \cdot 10^{+148} \lor \neg \left(yx \leq 2.2 \cdot 10^{+167}\right):\\ \;\;\;\;\left(zy - xy\right) \cdot yx\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(yy - zy, xx, \left(xy - yy\right) \cdot zx\right)\\ \end{array} \end{array} \]
            (FPCore (xx yy yx zy zx xy)
             :precision binary64
             (if (or (<= yx -1.7e+148) (not (<= yx 2.2e+167)))
               (* (- zy xy) yx)
               (fma (- yy zy) xx (* (- xy yy) zx))))
            double code(double xx, double yy, double yx, double zy, double zx, double xy) {
            	double tmp;
            	if ((yx <= -1.7e+148) || !(yx <= 2.2e+167)) {
            		tmp = (zy - xy) * yx;
            	} else {
            		tmp = fma((yy - zy), xx, ((xy - yy) * zx));
            	}
            	return tmp;
            }
            
            function code(xx, yy, yx, zy, zx, xy)
            	tmp = 0.0
            	if ((yx <= -1.7e+148) || !(yx <= 2.2e+167))
            		tmp = Float64(Float64(zy - xy) * yx);
            	else
            		tmp = fma(Float64(yy - zy), xx, Float64(Float64(xy - yy) * zx));
            	end
            	return tmp
            end
            
            code[xx_, yy_, yx_, zy_, zx_, xy_] := If[Or[LessEqual[yx, -1.7e+148], N[Not[LessEqual[yx, 2.2e+167]], $MachinePrecision]], N[(N[(zy - xy), $MachinePrecision] * yx), $MachinePrecision], N[(N[(yy - zy), $MachinePrecision] * xx + N[(N[(xy - yy), $MachinePrecision] * zx), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;yx \leq -1.7 \cdot 10^{+148} \lor \neg \left(yx \leq 2.2 \cdot 10^{+167}\right):\\
            \;\;\;\;\left(zy - xy\right) \cdot yx\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(yy - zy, xx, \left(xy - yy\right) \cdot zx\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if yx < -1.7000000000000001e148 or 2.20000000000000003e167 < yx

              1. Initial program 76.4%

                \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
              2. Add Preprocessing
              3. Taylor expanded in yx around inf

                \[\leadsto \color{blue}{yx \cdot \left(zy - xy\right)} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]
                2. lower-*.f64N/A

                  \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]
                3. lower--.f6487.6

                  \[\leadsto \color{blue}{\left(zy - xy\right)} \cdot yx \]
              5. Applied rewrites87.6%

                \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]

              if -1.7000000000000001e148 < yx < 2.20000000000000003e167

              1. Initial program 86.0%

                \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
              2. Add Preprocessing
              3. Taylor expanded in zy around 0

                \[\leadsto \color{blue}{\left(xx \cdot yy + xy \cdot zx\right) - \left(xy \cdot yx + yy \cdot zx\right)} \]
              4. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \color{blue}{\left(xy \cdot zx + xx \cdot yy\right)} - \left(xy \cdot yx + yy \cdot zx\right) \]
                2. associate--l+N/A

                  \[\leadsto \color{blue}{xy \cdot zx + \left(xx \cdot yy - \left(xy \cdot yx + yy \cdot zx\right)\right)} \]
                3. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(xy, zx, xx \cdot yy - \left(xy \cdot yx + yy \cdot zx\right)\right)} \]
                4. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{xx \cdot yy + \left(\mathsf{neg}\left(\left(xy \cdot yx + yy \cdot zx\right)\right)\right)}\right) \]
                5. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\mathsf{neg}\left(\color{blue}{\left(yy \cdot zx + xy \cdot yx\right)}\right)\right)\right) \]
                6. distribute-neg-inN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \color{blue}{\left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \left(\mathsf{neg}\left(xy \cdot yx\right)\right)\right)}\right) \]
                7. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \left(\mathsf{neg}\left(\color{blue}{yx \cdot xy}\right)\right)\right)\right) \]
                8. distribute-lft-neg-inN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \color{blue}{\left(\mathsf{neg}\left(yx\right)\right) \cdot xy}\right)\right) \]
                9. associate-+r+N/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\left(xx \cdot yy + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy}\right) \]
                10. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, \left(\color{blue}{yy \cdot xx} + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                11. distribute-rgt-neg-inN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, \left(yy \cdot xx + \color{blue}{yy \cdot \left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                12. mul-1-negN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, \left(yy \cdot xx + yy \cdot \color{blue}{\left(-1 \cdot zx\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                13. distribute-lft-inN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{yy \cdot \left(xx + -1 \cdot zx\right)} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                14. mul-1-negN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, yy \cdot \left(xx + \color{blue}{\left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                15. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, yy \cdot \color{blue}{\left(xx - zx\right)} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                16. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\left(xx - zx\right) \cdot yy} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                17. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\mathsf{fma}\left(xx - zx, yy, \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right)}\right) \]
                18. lower--.f64N/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, \mathsf{fma}\left(\color{blue}{xx - zx}, yy, \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right)\right) \]
              5. Applied rewrites69.1%

                \[\leadsto \color{blue}{\mathsf{fma}\left(xy, zx, \mathsf{fma}\left(xx - zx, yy, \left(-yx\right) \cdot xy\right)\right)} \]
              6. Taylor expanded in yx around 0

                \[\leadsto \color{blue}{\left(xx \cdot yy + xy \cdot zx\right) - \left(xx \cdot zy + yy \cdot zx\right)} \]
              7. Step-by-step derivation
                1. associate--r+N/A

                  \[\leadsto \color{blue}{\left(\left(xx \cdot yy + xy \cdot zx\right) - xx \cdot zy\right) - yy \cdot zx} \]
                2. sub-negN/A

                  \[\leadsto \color{blue}{\left(\left(xx \cdot yy + xy \cdot zx\right) + \left(\mathsf{neg}\left(xx \cdot zy\right)\right)\right)} - yy \cdot zx \]
                3. +-commutativeN/A

                  \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(xx \cdot zy\right)\right) + \left(xx \cdot yy + xy \cdot zx\right)\right)} - yy \cdot zx \]
                4. associate-+r+N/A

                  \[\leadsto \color{blue}{\left(\left(\left(\mathsf{neg}\left(xx \cdot zy\right)\right) + xx \cdot yy\right) + xy \cdot zx\right)} - yy \cdot zx \]
                5. associate--l+N/A

                  \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(xx \cdot zy\right)\right) + xx \cdot yy\right) + \left(xy \cdot zx - yy \cdot zx\right)} \]
                6. +-commutativeN/A

                  \[\leadsto \color{blue}{\left(xx \cdot yy + \left(\mathsf{neg}\left(xx \cdot zy\right)\right)\right)} + \left(xy \cdot zx - yy \cdot zx\right) \]
                7. unsub-negN/A

                  \[\leadsto \color{blue}{\left(xx \cdot yy - xx \cdot zy\right)} + \left(xy \cdot zx - yy \cdot zx\right) \]
                8. distribute-lft-out--N/A

                  \[\leadsto \color{blue}{xx \cdot \left(yy - zy\right)} + \left(xy \cdot zx - yy \cdot zx\right) \]
                9. *-commutativeN/A

                  \[\leadsto \color{blue}{\left(yy - zy\right) \cdot xx} + \left(xy \cdot zx - yy \cdot zx\right) \]
                10. distribute-rgt-out--N/A

                  \[\leadsto \left(yy - zy\right) \cdot xx + \color{blue}{zx \cdot \left(xy - yy\right)} \]
                11. sub-negN/A

                  \[\leadsto \left(yy - zy\right) \cdot xx + zx \cdot \color{blue}{\left(xy + \left(\mathsf{neg}\left(yy\right)\right)\right)} \]
                12. mul-1-negN/A

                  \[\leadsto \left(yy - zy\right) \cdot xx + zx \cdot \left(xy + \color{blue}{-1 \cdot yy}\right) \]
                13. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(yy - zy, xx, zx \cdot \left(xy + -1 \cdot yy\right)\right)} \]
                14. lower--.f64N/A

                  \[\leadsto \mathsf{fma}\left(\color{blue}{yy - zy}, xx, zx \cdot \left(xy + -1 \cdot yy\right)\right) \]
                15. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(yy - zy, xx, \color{blue}{\left(xy + -1 \cdot yy\right) \cdot zx}\right) \]
                16. lower-*.f64N/A

                  \[\leadsto \mathsf{fma}\left(yy - zy, xx, \color{blue}{\left(xy + -1 \cdot yy\right) \cdot zx}\right) \]
                17. mul-1-negN/A

                  \[\leadsto \mathsf{fma}\left(yy - zy, xx, \left(xy + \color{blue}{\left(\mathsf{neg}\left(yy\right)\right)}\right) \cdot zx\right) \]
                18. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(yy - zy, xx, \color{blue}{\left(xy - yy\right)} \cdot zx\right) \]
                19. lower--.f6480.5

                  \[\leadsto \mathsf{fma}\left(yy - zy, xx, \color{blue}{\left(xy - yy\right)} \cdot zx\right) \]
              8. Applied rewrites80.5%

                \[\leadsto \color{blue}{\mathsf{fma}\left(yy - zy, xx, \left(xy - yy\right) \cdot zx\right)} \]
            3. Recombined 2 regimes into one program.
            4. Final simplification82.0%

              \[\leadsto \begin{array}{l} \mathbf{if}\;yx \leq -1.7 \cdot 10^{+148} \lor \neg \left(yx \leq 2.2 \cdot 10^{+167}\right):\\ \;\;\;\;\left(zy - xy\right) \cdot yx\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(yy - zy, xx, \left(xy - yy\right) \cdot zx\right)\\ \end{array} \]
            5. Add Preprocessing

            Alternative 7: 64.0% accurate, 1.7× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;yx \leq -1.7 \cdot 10^{+148} \lor \neg \left(yx \leq 1.3 \cdot 10^{+103}\right):\\ \;\;\;\;\left(zy - xy\right) \cdot yx\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(xx - zx, yy, zx \cdot xy\right)\\ \end{array} \end{array} \]
            (FPCore (xx yy yx zy zx xy)
             :precision binary64
             (if (or (<= yx -1.7e+148) (not (<= yx 1.3e+103)))
               (* (- zy xy) yx)
               (fma (- xx zx) yy (* zx xy))))
            double code(double xx, double yy, double yx, double zy, double zx, double xy) {
            	double tmp;
            	if ((yx <= -1.7e+148) || !(yx <= 1.3e+103)) {
            		tmp = (zy - xy) * yx;
            	} else {
            		tmp = fma((xx - zx), yy, (zx * xy));
            	}
            	return tmp;
            }
            
            function code(xx, yy, yx, zy, zx, xy)
            	tmp = 0.0
            	if ((yx <= -1.7e+148) || !(yx <= 1.3e+103))
            		tmp = Float64(Float64(zy - xy) * yx);
            	else
            		tmp = fma(Float64(xx - zx), yy, Float64(zx * xy));
            	end
            	return tmp
            end
            
            code[xx_, yy_, yx_, zy_, zx_, xy_] := If[Or[LessEqual[yx, -1.7e+148], N[Not[LessEqual[yx, 1.3e+103]], $MachinePrecision]], N[(N[(zy - xy), $MachinePrecision] * yx), $MachinePrecision], N[(N[(xx - zx), $MachinePrecision] * yy + N[(zx * xy), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;yx \leq -1.7 \cdot 10^{+148} \lor \neg \left(yx \leq 1.3 \cdot 10^{+103}\right):\\
            \;\;\;\;\left(zy - xy\right) \cdot yx\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(xx - zx, yy, zx \cdot xy\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if yx < -1.7000000000000001e148 or 1.3000000000000001e103 < yx

              1. Initial program 75.0%

                \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
              2. Add Preprocessing
              3. Taylor expanded in yx around inf

                \[\leadsto \color{blue}{yx \cdot \left(zy - xy\right)} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]
                2. lower-*.f64N/A

                  \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]
                3. lower--.f6480.0

                  \[\leadsto \color{blue}{\left(zy - xy\right)} \cdot yx \]
              5. Applied rewrites80.0%

                \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]

              if -1.7000000000000001e148 < yx < 1.3000000000000001e103

              1. Initial program 87.2%

                \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
              2. Add Preprocessing
              3. Taylor expanded in zy around 0

                \[\leadsto \color{blue}{\left(xx \cdot yy + xy \cdot zx\right) - \left(xy \cdot yx + yy \cdot zx\right)} \]
              4. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto \color{blue}{\left(xy \cdot zx + xx \cdot yy\right)} - \left(xy \cdot yx + yy \cdot zx\right) \]
                2. associate--l+N/A

                  \[\leadsto \color{blue}{xy \cdot zx + \left(xx \cdot yy - \left(xy \cdot yx + yy \cdot zx\right)\right)} \]
                3. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(xy, zx, xx \cdot yy - \left(xy \cdot yx + yy \cdot zx\right)\right)} \]
                4. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{xx \cdot yy + \left(\mathsf{neg}\left(\left(xy \cdot yx + yy \cdot zx\right)\right)\right)}\right) \]
                5. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\mathsf{neg}\left(\color{blue}{\left(yy \cdot zx + xy \cdot yx\right)}\right)\right)\right) \]
                6. distribute-neg-inN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \color{blue}{\left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \left(\mathsf{neg}\left(xy \cdot yx\right)\right)\right)}\right) \]
                7. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \left(\mathsf{neg}\left(\color{blue}{yx \cdot xy}\right)\right)\right)\right) \]
                8. distribute-lft-neg-inN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \color{blue}{\left(\mathsf{neg}\left(yx\right)\right) \cdot xy}\right)\right) \]
                9. associate-+r+N/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\left(xx \cdot yy + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy}\right) \]
                10. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, \left(\color{blue}{yy \cdot xx} + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                11. distribute-rgt-neg-inN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, \left(yy \cdot xx + \color{blue}{yy \cdot \left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                12. mul-1-negN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, \left(yy \cdot xx + yy \cdot \color{blue}{\left(-1 \cdot zx\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                13. distribute-lft-inN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{yy \cdot \left(xx + -1 \cdot zx\right)} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                14. mul-1-negN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, yy \cdot \left(xx + \color{blue}{\left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                15. sub-negN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, yy \cdot \color{blue}{\left(xx - zx\right)} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                16. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\left(xx - zx\right) \cdot yy} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                17. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\mathsf{fma}\left(xx - zx, yy, \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right)}\right) \]
                18. lower--.f64N/A

                  \[\leadsto \mathsf{fma}\left(xy, zx, \mathsf{fma}\left(\color{blue}{xx - zx}, yy, \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right)\right) \]
              5. Applied rewrites71.1%

                \[\leadsto \color{blue}{\mathsf{fma}\left(xy, zx, \mathsf{fma}\left(xx - zx, yy, \left(-yx\right) \cdot xy\right)\right)} \]
              6. Taylor expanded in yx around 0

                \[\leadsto xy \cdot zx + \color{blue}{yy \cdot \left(xx - zx\right)} \]
              7. Step-by-step derivation
                1. Applied rewrites62.5%

                  \[\leadsto \mathsf{fma}\left(xx - zx, \color{blue}{yy}, zx \cdot xy\right) \]
              8. Recombined 2 regimes into one program.
              9. Final simplification67.1%

                \[\leadsto \begin{array}{l} \mathbf{if}\;yx \leq -1.7 \cdot 10^{+148} \lor \neg \left(yx \leq 1.3 \cdot 10^{+103}\right):\\ \;\;\;\;\left(zy - xy\right) \cdot yx\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(xx - zx, yy, zx \cdot xy\right)\\ \end{array} \]
              10. Add Preprocessing

              Alternative 8: 44.7% accurate, 1.7× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(xx - zx\right) \cdot yy\\ \mathbf{if}\;yy \leq -1.75 \cdot 10^{+70}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;yy \leq -3.2 \cdot 10^{-78}:\\ \;\;\;\;\left(xy - yy\right) \cdot zx\\ \mathbf{elif}\;yy \leq 1.2 \cdot 10^{-64}:\\ \;\;\;\;\left(-zy\right) \cdot xx\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
              (FPCore (xx yy yx zy zx xy)
               :precision binary64
               (let* ((t_0 (* (- xx zx) yy)))
                 (if (<= yy -1.75e+70)
                   t_0
                   (if (<= yy -3.2e-78)
                     (* (- xy yy) zx)
                     (if (<= yy 1.2e-64) (* (- zy) xx) t_0)))))
              double code(double xx, double yy, double yx, double zy, double zx, double xy) {
              	double t_0 = (xx - zx) * yy;
              	double tmp;
              	if (yy <= -1.75e+70) {
              		tmp = t_0;
              	} else if (yy <= -3.2e-78) {
              		tmp = (xy - yy) * zx;
              	} else if (yy <= 1.2e-64) {
              		tmp = -zy * xx;
              	} else {
              		tmp = t_0;
              	}
              	return tmp;
              }
              
              real(8) function code(xx, yy, yx, zy, zx, xy)
                  real(8), intent (in) :: xx
                  real(8), intent (in) :: yy
                  real(8), intent (in) :: yx
                  real(8), intent (in) :: zy
                  real(8), intent (in) :: zx
                  real(8), intent (in) :: xy
                  real(8) :: t_0
                  real(8) :: tmp
                  t_0 = (xx - zx) * yy
                  if (yy <= (-1.75d+70)) then
                      tmp = t_0
                  else if (yy <= (-3.2d-78)) then
                      tmp = (xy - yy) * zx
                  else if (yy <= 1.2d-64) then
                      tmp = -zy * xx
                  else
                      tmp = t_0
                  end if
                  code = tmp
              end function
              
              public static double code(double xx, double yy, double yx, double zy, double zx, double xy) {
              	double t_0 = (xx - zx) * yy;
              	double tmp;
              	if (yy <= -1.75e+70) {
              		tmp = t_0;
              	} else if (yy <= -3.2e-78) {
              		tmp = (xy - yy) * zx;
              	} else if (yy <= 1.2e-64) {
              		tmp = -zy * xx;
              	} else {
              		tmp = t_0;
              	}
              	return tmp;
              }
              
              def code(xx, yy, yx, zy, zx, xy):
              	t_0 = (xx - zx) * yy
              	tmp = 0
              	if yy <= -1.75e+70:
              		tmp = t_0
              	elif yy <= -3.2e-78:
              		tmp = (xy - yy) * zx
              	elif yy <= 1.2e-64:
              		tmp = -zy * xx
              	else:
              		tmp = t_0
              	return tmp
              
              function code(xx, yy, yx, zy, zx, xy)
              	t_0 = Float64(Float64(xx - zx) * yy)
              	tmp = 0.0
              	if (yy <= -1.75e+70)
              		tmp = t_0;
              	elseif (yy <= -3.2e-78)
              		tmp = Float64(Float64(xy - yy) * zx);
              	elseif (yy <= 1.2e-64)
              		tmp = Float64(Float64(-zy) * xx);
              	else
              		tmp = t_0;
              	end
              	return tmp
              end
              
              function tmp_2 = code(xx, yy, yx, zy, zx, xy)
              	t_0 = (xx - zx) * yy;
              	tmp = 0.0;
              	if (yy <= -1.75e+70)
              		tmp = t_0;
              	elseif (yy <= -3.2e-78)
              		tmp = (xy - yy) * zx;
              	elseif (yy <= 1.2e-64)
              		tmp = -zy * xx;
              	else
              		tmp = t_0;
              	end
              	tmp_2 = tmp;
              end
              
              code[xx_, yy_, yx_, zy_, zx_, xy_] := Block[{t$95$0 = N[(N[(xx - zx), $MachinePrecision] * yy), $MachinePrecision]}, If[LessEqual[yy, -1.75e+70], t$95$0, If[LessEqual[yy, -3.2e-78], N[(N[(xy - yy), $MachinePrecision] * zx), $MachinePrecision], If[LessEqual[yy, 1.2e-64], N[((-zy) * xx), $MachinePrecision], t$95$0]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := \left(xx - zx\right) \cdot yy\\
              \mathbf{if}\;yy \leq -1.75 \cdot 10^{+70}:\\
              \;\;\;\;t\_0\\
              
              \mathbf{elif}\;yy \leq -3.2 \cdot 10^{-78}:\\
              \;\;\;\;\left(xy - yy\right) \cdot zx\\
              
              \mathbf{elif}\;yy \leq 1.2 \cdot 10^{-64}:\\
              \;\;\;\;\left(-zy\right) \cdot xx\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_0\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if yy < -1.75000000000000001e70 or 1.19999999999999999e-64 < yy

                1. Initial program 76.7%

                  \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
                2. Add Preprocessing
                3. Taylor expanded in yy around inf

                  \[\leadsto \color{blue}{yy \cdot \left(xx - zx\right)} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \color{blue}{\left(xx - zx\right) \cdot yy} \]
                  2. lower-*.f64N/A

                    \[\leadsto \color{blue}{\left(xx - zx\right) \cdot yy} \]
                  3. lower--.f6465.5

                    \[\leadsto \color{blue}{\left(xx - zx\right)} \cdot yy \]
                5. Applied rewrites65.5%

                  \[\leadsto \color{blue}{\left(xx - zx\right) \cdot yy} \]

                if -1.75000000000000001e70 < yy < -3.2e-78

                1. Initial program 91.9%

                  \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
                2. Add Preprocessing
                3. Taylor expanded in zx around inf

                  \[\leadsto \color{blue}{zx \cdot \left(xy - yy\right)} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \color{blue}{\left(xy - yy\right) \cdot zx} \]
                  2. lower-*.f64N/A

                    \[\leadsto \color{blue}{\left(xy - yy\right) \cdot zx} \]
                  3. lower--.f6445.4

                    \[\leadsto \color{blue}{\left(xy - yy\right)} \cdot zx \]
                5. Applied rewrites45.4%

                  \[\leadsto \color{blue}{\left(xy - yy\right) \cdot zx} \]

                if -3.2e-78 < yy < 1.19999999999999999e-64

                1. Initial program 91.1%

                  \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
                2. Add Preprocessing
                3. Taylor expanded in xx around inf

                  \[\leadsto \color{blue}{xx \cdot \left(yy - zy\right)} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \color{blue}{\left(yy - zy\right) \cdot xx} \]
                  2. lower-*.f64N/A

                    \[\leadsto \color{blue}{\left(yy - zy\right) \cdot xx} \]
                  3. lower--.f6436.2

                    \[\leadsto \color{blue}{\left(yy - zy\right)} \cdot xx \]
                5. Applied rewrites36.2%

                  \[\leadsto \color{blue}{\left(yy - zy\right) \cdot xx} \]
                6. Taylor expanded in yy around 0

                  \[\leadsto \left(-1 \cdot zy\right) \cdot xx \]
                7. Step-by-step derivation
                  1. Applied rewrites35.3%

                    \[\leadsto \left(-zy\right) \cdot xx \]
                8. Recombined 3 regimes into one program.
                9. Add Preprocessing

                Alternative 9: 54.5% accurate, 2.2× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;xx \leq -5.4 \cdot 10^{+28} \lor \neg \left(xx \leq 1.15 \cdot 10^{-9}\right):\\ \;\;\;\;\left(yy - zy\right) \cdot xx\\ \mathbf{else}:\\ \;\;\;\;\left(xy - yy\right) \cdot zx\\ \end{array} \end{array} \]
                (FPCore (xx yy yx zy zx xy)
                 :precision binary64
                 (if (or (<= xx -5.4e+28) (not (<= xx 1.15e-9)))
                   (* (- yy zy) xx)
                   (* (- xy yy) zx)))
                double code(double xx, double yy, double yx, double zy, double zx, double xy) {
                	double tmp;
                	if ((xx <= -5.4e+28) || !(xx <= 1.15e-9)) {
                		tmp = (yy - zy) * xx;
                	} else {
                		tmp = (xy - yy) * zx;
                	}
                	return tmp;
                }
                
                real(8) function code(xx, yy, yx, zy, zx, xy)
                    real(8), intent (in) :: xx
                    real(8), intent (in) :: yy
                    real(8), intent (in) :: yx
                    real(8), intent (in) :: zy
                    real(8), intent (in) :: zx
                    real(8), intent (in) :: xy
                    real(8) :: tmp
                    if ((xx <= (-5.4d+28)) .or. (.not. (xx <= 1.15d-9))) then
                        tmp = (yy - zy) * xx
                    else
                        tmp = (xy - yy) * zx
                    end if
                    code = tmp
                end function
                
                public static double code(double xx, double yy, double yx, double zy, double zx, double xy) {
                	double tmp;
                	if ((xx <= -5.4e+28) || !(xx <= 1.15e-9)) {
                		tmp = (yy - zy) * xx;
                	} else {
                		tmp = (xy - yy) * zx;
                	}
                	return tmp;
                }
                
                def code(xx, yy, yx, zy, zx, xy):
                	tmp = 0
                	if (xx <= -5.4e+28) or not (xx <= 1.15e-9):
                		tmp = (yy - zy) * xx
                	else:
                		tmp = (xy - yy) * zx
                	return tmp
                
                function code(xx, yy, yx, zy, zx, xy)
                	tmp = 0.0
                	if ((xx <= -5.4e+28) || !(xx <= 1.15e-9))
                		tmp = Float64(Float64(yy - zy) * xx);
                	else
                		tmp = Float64(Float64(xy - yy) * zx);
                	end
                	return tmp
                end
                
                function tmp_2 = code(xx, yy, yx, zy, zx, xy)
                	tmp = 0.0;
                	if ((xx <= -5.4e+28) || ~((xx <= 1.15e-9)))
                		tmp = (yy - zy) * xx;
                	else
                		tmp = (xy - yy) * zx;
                	end
                	tmp_2 = tmp;
                end
                
                code[xx_, yy_, yx_, zy_, zx_, xy_] := If[Or[LessEqual[xx, -5.4e+28], N[Not[LessEqual[xx, 1.15e-9]], $MachinePrecision]], N[(N[(yy - zy), $MachinePrecision] * xx), $MachinePrecision], N[(N[(xy - yy), $MachinePrecision] * zx), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;xx \leq -5.4 \cdot 10^{+28} \lor \neg \left(xx \leq 1.15 \cdot 10^{-9}\right):\\
                \;\;\;\;\left(yy - zy\right) \cdot xx\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(xy - yy\right) \cdot zx\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if xx < -5.4000000000000003e28 or 1.15e-9 < xx

                  1. Initial program 75.5%

                    \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
                  2. Add Preprocessing
                  3. Taylor expanded in xx around inf

                    \[\leadsto \color{blue}{xx \cdot \left(yy - zy\right)} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \color{blue}{\left(yy - zy\right) \cdot xx} \]
                    2. lower-*.f64N/A

                      \[\leadsto \color{blue}{\left(yy - zy\right) \cdot xx} \]
                    3. lower--.f6465.5

                      \[\leadsto \color{blue}{\left(yy - zy\right)} \cdot xx \]
                  5. Applied rewrites65.5%

                    \[\leadsto \color{blue}{\left(yy - zy\right) \cdot xx} \]

                  if -5.4000000000000003e28 < xx < 1.15e-9

                  1. Initial program 92.8%

                    \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
                  2. Add Preprocessing
                  3. Taylor expanded in zx around inf

                    \[\leadsto \color{blue}{zx \cdot \left(xy - yy\right)} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \color{blue}{\left(xy - yy\right) \cdot zx} \]
                    2. lower-*.f64N/A

                      \[\leadsto \color{blue}{\left(xy - yy\right) \cdot zx} \]
                    3. lower--.f6445.5

                      \[\leadsto \color{blue}{\left(xy - yy\right)} \cdot zx \]
                  5. Applied rewrites45.5%

                    \[\leadsto \color{blue}{\left(xy - yy\right) \cdot zx} \]
                3. Recombined 2 regimes into one program.
                4. Final simplification55.7%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;xx \leq -5.4 \cdot 10^{+28} \lor \neg \left(xx \leq 1.15 \cdot 10^{-9}\right):\\ \;\;\;\;\left(yy - zy\right) \cdot xx\\ \mathbf{else}:\\ \;\;\;\;\left(xy - yy\right) \cdot zx\\ \end{array} \]
                5. Add Preprocessing

                Alternative 10: 44.2% accurate, 2.2× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;yy \leq -2.1 \cdot 10^{-77} \lor \neg \left(yy \leq 1.2 \cdot 10^{-64}\right):\\ \;\;\;\;\left(xx - zx\right) \cdot yy\\ \mathbf{else}:\\ \;\;\;\;\left(-zy\right) \cdot xx\\ \end{array} \end{array} \]
                (FPCore (xx yy yx zy zx xy)
                 :precision binary64
                 (if (or (<= yy -2.1e-77) (not (<= yy 1.2e-64)))
                   (* (- xx zx) yy)
                   (* (- zy) xx)))
                double code(double xx, double yy, double yx, double zy, double zx, double xy) {
                	double tmp;
                	if ((yy <= -2.1e-77) || !(yy <= 1.2e-64)) {
                		tmp = (xx - zx) * yy;
                	} else {
                		tmp = -zy * xx;
                	}
                	return tmp;
                }
                
                real(8) function code(xx, yy, yx, zy, zx, xy)
                    real(8), intent (in) :: xx
                    real(8), intent (in) :: yy
                    real(8), intent (in) :: yx
                    real(8), intent (in) :: zy
                    real(8), intent (in) :: zx
                    real(8), intent (in) :: xy
                    real(8) :: tmp
                    if ((yy <= (-2.1d-77)) .or. (.not. (yy <= 1.2d-64))) then
                        tmp = (xx - zx) * yy
                    else
                        tmp = -zy * xx
                    end if
                    code = tmp
                end function
                
                public static double code(double xx, double yy, double yx, double zy, double zx, double xy) {
                	double tmp;
                	if ((yy <= -2.1e-77) || !(yy <= 1.2e-64)) {
                		tmp = (xx - zx) * yy;
                	} else {
                		tmp = -zy * xx;
                	}
                	return tmp;
                }
                
                def code(xx, yy, yx, zy, zx, xy):
                	tmp = 0
                	if (yy <= -2.1e-77) or not (yy <= 1.2e-64):
                		tmp = (xx - zx) * yy
                	else:
                		tmp = -zy * xx
                	return tmp
                
                function code(xx, yy, yx, zy, zx, xy)
                	tmp = 0.0
                	if ((yy <= -2.1e-77) || !(yy <= 1.2e-64))
                		tmp = Float64(Float64(xx - zx) * yy);
                	else
                		tmp = Float64(Float64(-zy) * xx);
                	end
                	return tmp
                end
                
                function tmp_2 = code(xx, yy, yx, zy, zx, xy)
                	tmp = 0.0;
                	if ((yy <= -2.1e-77) || ~((yy <= 1.2e-64)))
                		tmp = (xx - zx) * yy;
                	else
                		tmp = -zy * xx;
                	end
                	tmp_2 = tmp;
                end
                
                code[xx_, yy_, yx_, zy_, zx_, xy_] := If[Or[LessEqual[yy, -2.1e-77], N[Not[LessEqual[yy, 1.2e-64]], $MachinePrecision]], N[(N[(xx - zx), $MachinePrecision] * yy), $MachinePrecision], N[((-zy) * xx), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;yy \leq -2.1 \cdot 10^{-77} \lor \neg \left(yy \leq 1.2 \cdot 10^{-64}\right):\\
                \;\;\;\;\left(xx - zx\right) \cdot yy\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(-zy\right) \cdot xx\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if yy < -2.10000000000000015e-77 or 1.19999999999999999e-64 < yy

                  1. Initial program 79.2%

                    \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
                  2. Add Preprocessing
                  3. Taylor expanded in yy around inf

                    \[\leadsto \color{blue}{yy \cdot \left(xx - zx\right)} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \color{blue}{\left(xx - zx\right) \cdot yy} \]
                    2. lower-*.f64N/A

                      \[\leadsto \color{blue}{\left(xx - zx\right) \cdot yy} \]
                    3. lower--.f6459.4

                      \[\leadsto \color{blue}{\left(xx - zx\right)} \cdot yy \]
                  5. Applied rewrites59.4%

                    \[\leadsto \color{blue}{\left(xx - zx\right) \cdot yy} \]

                  if -2.10000000000000015e-77 < yy < 1.19999999999999999e-64

                  1. Initial program 91.1%

                    \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
                  2. Add Preprocessing
                  3. Taylor expanded in xx around inf

                    \[\leadsto \color{blue}{xx \cdot \left(yy - zy\right)} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \color{blue}{\left(yy - zy\right) \cdot xx} \]
                    2. lower-*.f64N/A

                      \[\leadsto \color{blue}{\left(yy - zy\right) \cdot xx} \]
                    3. lower--.f6436.2

                      \[\leadsto \color{blue}{\left(yy - zy\right)} \cdot xx \]
                  5. Applied rewrites36.2%

                    \[\leadsto \color{blue}{\left(yy - zy\right) \cdot xx} \]
                  6. Taylor expanded in yy around 0

                    \[\leadsto \left(-1 \cdot zy\right) \cdot xx \]
                  7. Step-by-step derivation
                    1. Applied rewrites35.3%

                      \[\leadsto \left(-zy\right) \cdot xx \]
                  8. Recombined 2 regimes into one program.
                  9. Final simplification49.8%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;yy \leq -2.1 \cdot 10^{-77} \lor \neg \left(yy \leq 1.2 \cdot 10^{-64}\right):\\ \;\;\;\;\left(xx - zx\right) \cdot yy\\ \mathbf{else}:\\ \;\;\;\;\left(-zy\right) \cdot xx\\ \end{array} \]
                  10. Add Preprocessing

                  Alternative 11: 28.3% accurate, 2.5× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;yx \leq -1.1 \cdot 10^{+91} \lor \neg \left(yx \leq 1.85 \cdot 10^{+142}\right):\\ \;\;\;\;zy \cdot yx\\ \mathbf{else}:\\ \;\;\;\;yy \cdot xx\\ \end{array} \end{array} \]
                  (FPCore (xx yy yx zy zx xy)
                   :precision binary64
                   (if (or (<= yx -1.1e+91) (not (<= yx 1.85e+142))) (* zy yx) (* yy xx)))
                  double code(double xx, double yy, double yx, double zy, double zx, double xy) {
                  	double tmp;
                  	if ((yx <= -1.1e+91) || !(yx <= 1.85e+142)) {
                  		tmp = zy * yx;
                  	} else {
                  		tmp = yy * xx;
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(xx, yy, yx, zy, zx, xy)
                      real(8), intent (in) :: xx
                      real(8), intent (in) :: yy
                      real(8), intent (in) :: yx
                      real(8), intent (in) :: zy
                      real(8), intent (in) :: zx
                      real(8), intent (in) :: xy
                      real(8) :: tmp
                      if ((yx <= (-1.1d+91)) .or. (.not. (yx <= 1.85d+142))) then
                          tmp = zy * yx
                      else
                          tmp = yy * xx
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double xx, double yy, double yx, double zy, double zx, double xy) {
                  	double tmp;
                  	if ((yx <= -1.1e+91) || !(yx <= 1.85e+142)) {
                  		tmp = zy * yx;
                  	} else {
                  		tmp = yy * xx;
                  	}
                  	return tmp;
                  }
                  
                  def code(xx, yy, yx, zy, zx, xy):
                  	tmp = 0
                  	if (yx <= -1.1e+91) or not (yx <= 1.85e+142):
                  		tmp = zy * yx
                  	else:
                  		tmp = yy * xx
                  	return tmp
                  
                  function code(xx, yy, yx, zy, zx, xy)
                  	tmp = 0.0
                  	if ((yx <= -1.1e+91) || !(yx <= 1.85e+142))
                  		tmp = Float64(zy * yx);
                  	else
                  		tmp = Float64(yy * xx);
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(xx, yy, yx, zy, zx, xy)
                  	tmp = 0.0;
                  	if ((yx <= -1.1e+91) || ~((yx <= 1.85e+142)))
                  		tmp = zy * yx;
                  	else
                  		tmp = yy * xx;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[xx_, yy_, yx_, zy_, zx_, xy_] := If[Or[LessEqual[yx, -1.1e+91], N[Not[LessEqual[yx, 1.85e+142]], $MachinePrecision]], N[(zy * yx), $MachinePrecision], N[(yy * xx), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;yx \leq -1.1 \cdot 10^{+91} \lor \neg \left(yx \leq 1.85 \cdot 10^{+142}\right):\\
                  \;\;\;\;zy \cdot yx\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;yy \cdot xx\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if yx < -1.1e91 or 1.8499999999999999e142 < yx

                    1. Initial program 75.3%

                      \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
                    2. Add Preprocessing
                    3. Taylor expanded in yx around inf

                      \[\leadsto \color{blue}{yx \cdot \left(zy - xy\right)} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]
                      2. lower-*.f64N/A

                        \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]
                      3. lower--.f6474.6

                        \[\leadsto \color{blue}{\left(zy - xy\right)} \cdot yx \]
                    5. Applied rewrites74.6%

                      \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]
                    6. Taylor expanded in zy around inf

                      \[\leadsto yx \cdot \color{blue}{zy} \]
                    7. Step-by-step derivation
                      1. Applied rewrites41.9%

                        \[\leadsto zy \cdot \color{blue}{yx} \]

                      if -1.1e91 < yx < 1.8499999999999999e142

                      1. Initial program 87.7%

                        \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
                      2. Add Preprocessing
                      3. Taylor expanded in zy around 0

                        \[\leadsto \color{blue}{\left(xx \cdot yy + xy \cdot zx\right) - \left(xy \cdot yx + yy \cdot zx\right)} \]
                      4. Step-by-step derivation
                        1. +-commutativeN/A

                          \[\leadsto \color{blue}{\left(xy \cdot zx + xx \cdot yy\right)} - \left(xy \cdot yx + yy \cdot zx\right) \]
                        2. associate--l+N/A

                          \[\leadsto \color{blue}{xy \cdot zx + \left(xx \cdot yy - \left(xy \cdot yx + yy \cdot zx\right)\right)} \]
                        3. lower-fma.f64N/A

                          \[\leadsto \color{blue}{\mathsf{fma}\left(xy, zx, xx \cdot yy - \left(xy \cdot yx + yy \cdot zx\right)\right)} \]
                        4. sub-negN/A

                          \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{xx \cdot yy + \left(\mathsf{neg}\left(\left(xy \cdot yx + yy \cdot zx\right)\right)\right)}\right) \]
                        5. +-commutativeN/A

                          \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\mathsf{neg}\left(\color{blue}{\left(yy \cdot zx + xy \cdot yx\right)}\right)\right)\right) \]
                        6. distribute-neg-inN/A

                          \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \color{blue}{\left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \left(\mathsf{neg}\left(xy \cdot yx\right)\right)\right)}\right) \]
                        7. *-commutativeN/A

                          \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \left(\mathsf{neg}\left(\color{blue}{yx \cdot xy}\right)\right)\right)\right) \]
                        8. distribute-lft-neg-inN/A

                          \[\leadsto \mathsf{fma}\left(xy, zx, xx \cdot yy + \left(\left(\mathsf{neg}\left(yy \cdot zx\right)\right) + \color{blue}{\left(\mathsf{neg}\left(yx\right)\right) \cdot xy}\right)\right) \]
                        9. associate-+r+N/A

                          \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\left(xx \cdot yy + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy}\right) \]
                        10. *-commutativeN/A

                          \[\leadsto \mathsf{fma}\left(xy, zx, \left(\color{blue}{yy \cdot xx} + \left(\mathsf{neg}\left(yy \cdot zx\right)\right)\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                        11. distribute-rgt-neg-inN/A

                          \[\leadsto \mathsf{fma}\left(xy, zx, \left(yy \cdot xx + \color{blue}{yy \cdot \left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                        12. mul-1-negN/A

                          \[\leadsto \mathsf{fma}\left(xy, zx, \left(yy \cdot xx + yy \cdot \color{blue}{\left(-1 \cdot zx\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                        13. distribute-lft-inN/A

                          \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{yy \cdot \left(xx + -1 \cdot zx\right)} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                        14. mul-1-negN/A

                          \[\leadsto \mathsf{fma}\left(xy, zx, yy \cdot \left(xx + \color{blue}{\left(\mathsf{neg}\left(zx\right)\right)}\right) + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                        15. sub-negN/A

                          \[\leadsto \mathsf{fma}\left(xy, zx, yy \cdot \color{blue}{\left(xx - zx\right)} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                        16. *-commutativeN/A

                          \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\left(xx - zx\right) \cdot yy} + \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right) \]
                        17. lower-fma.f64N/A

                          \[\leadsto \mathsf{fma}\left(xy, zx, \color{blue}{\mathsf{fma}\left(xx - zx, yy, \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right)}\right) \]
                        18. lower--.f64N/A

                          \[\leadsto \mathsf{fma}\left(xy, zx, \mathsf{fma}\left(\color{blue}{xx - zx}, yy, \left(\mathsf{neg}\left(yx\right)\right) \cdot xy\right)\right) \]
                      5. Applied rewrites70.2%

                        \[\leadsto \color{blue}{\mathsf{fma}\left(xy, zx, \mathsf{fma}\left(xx - zx, yy, \left(-yx\right) \cdot xy\right)\right)} \]
                      6. Taylor expanded in xx around inf

                        \[\leadsto xx \cdot \color{blue}{yy} \]
                      7. Step-by-step derivation
                        1. Applied rewrites28.0%

                          \[\leadsto yy \cdot \color{blue}{xx} \]
                      8. Recombined 2 regimes into one program.
                      9. Final simplification32.2%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;yx \leq -1.1 \cdot 10^{+91} \lor \neg \left(yx \leq 1.85 \cdot 10^{+142}\right):\\ \;\;\;\;zy \cdot yx\\ \mathbf{else}:\\ \;\;\;\;yy \cdot xx\\ \end{array} \]
                      10. Add Preprocessing

                      Alternative 12: 20.5% accurate, 7.7× speedup?

                      \[\begin{array}{l} \\ zy \cdot yx \end{array} \]
                      (FPCore (xx yy yx zy zx xy) :precision binary64 (* zy yx))
                      double code(double xx, double yy, double yx, double zy, double zx, double xy) {
                      	return zy * yx;
                      }
                      
                      real(8) function code(xx, yy, yx, zy, zx, xy)
                          real(8), intent (in) :: xx
                          real(8), intent (in) :: yy
                          real(8), intent (in) :: yx
                          real(8), intent (in) :: zy
                          real(8), intent (in) :: zx
                          real(8), intent (in) :: xy
                          code = zy * yx
                      end function
                      
                      public static double code(double xx, double yy, double yx, double zy, double zx, double xy) {
                      	return zy * yx;
                      }
                      
                      def code(xx, yy, yx, zy, zx, xy):
                      	return zy * yx
                      
                      function code(xx, yy, yx, zy, zx, xy)
                      	return Float64(zy * yx)
                      end
                      
                      function tmp = code(xx, yy, yx, zy, zx, xy)
                      	tmp = zy * yx;
                      end
                      
                      code[xx_, yy_, yx_, zy_, zx_, xy_] := N[(zy * yx), $MachinePrecision]
                      
                      \begin{array}{l}
                      
                      \\
                      zy \cdot yx
                      \end{array}
                      
                      Derivation
                      1. Initial program 84.0%

                        \[\left(\left(\left(\left(xx \cdot yy + yx \cdot zy\right) + zx \cdot xy\right) - xx \cdot zy\right) - yx \cdot xy\right) - zx \cdot yy \]
                      2. Add Preprocessing
                      3. Taylor expanded in yx around inf

                        \[\leadsto \color{blue}{yx \cdot \left(zy - xy\right)} \]
                      4. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]
                        2. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]
                        3. lower--.f6436.5

                          \[\leadsto \color{blue}{\left(zy - xy\right)} \cdot yx \]
                      5. Applied rewrites36.5%

                        \[\leadsto \color{blue}{\left(zy - xy\right) \cdot yx} \]
                      6. Taylor expanded in zy around inf

                        \[\leadsto yx \cdot \color{blue}{zy} \]
                      7. Step-by-step derivation
                        1. Applied rewrites19.5%

                          \[\leadsto zy \cdot \color{blue}{yx} \]
                        2. Add Preprocessing

                        Reproduce

                        ?
                        herbie shell --seed 1 
                        (FPCore (xx yy yx zy zx xy)
                          :name "xx*yy + yx*zy + zx*xy - xx*zy - yx*xy - zx*yy"
                          :precision binary64
                          :pre (and (and (and (and (and (and (<= -1.79e+308 xx) (<= xx 1.79e+308)) (and (<= -1.79e+308 yy) (<= yy 1.79e+308))) (and (<= -1.79e+308 yx) (<= yx 1.79e+308))) (and (<= -1.79e+308 zy) (<= zy 1.79e+308))) (and (<= -1.79e+308 zx) (<= zx 1.79e+308))) (and (<= -1.79e+308 xy) (<= xy 1.79e+308)))
                          (- (- (- (+ (+ (* xx yy) (* yx zy)) (* zx xy)) (* xx zy)) (* yx xy)) (* zx yy)))