Linear.Matrix:det33 from linear-1.19.1.3

Percentage Accurate: 73.0% → 83.1%
Time: 8.8s
Alternatives: 21
Speedup: 0.5×

Specification

?
\[\begin{array}{l} \\ \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (+
  (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
  (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 alternatives:

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

Initial Program: 73.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (+
  (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
  (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

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

Alternative 1: 83.1% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\

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


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

    1. Initial program 73.0%

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

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

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

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

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

    1. Initial program 73.0%

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

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

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(b \cdot i\right)\right) \]
    4. Applied rewrites58.3%

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

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

        \[\leadsto \left(\left(-1 \cdot \left(t \cdot x\right) + \frac{j \cdot \left(c \cdot t - i \cdot y\right)}{a}\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(\left(-1 \cdot \left(t \cdot x\right) + \frac{j \cdot \left(c \cdot t - i \cdot y\right)}{a}\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot a \]
    7. Applied rewrites58.5%

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

Alternative 2: 82.1% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 73.0%

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

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

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(b \cdot i\right)\right) \]
    4. Applied rewrites58.3%

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

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

        \[\leadsto \left(\left(-1 \cdot \left(t \cdot x\right) + \frac{j \cdot \left(c \cdot t - i \cdot y\right)}{a}\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(\left(-1 \cdot \left(t \cdot x\right) + \frac{j \cdot \left(c \cdot t - i \cdot y\right)}{a}\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot a \]
    7. Applied rewrites58.5%

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

Alternative 3: 71.1% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -7e-34 or 7.5000000000000004e97 < b

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

    if -7e-34 < b < 3.19999999999999986e-102

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-j\right) \cdot \left(\left(-1 \cdot c\right) \cdot t + i \cdot y\right) \]
      6. lower-fma.f64N/A

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

        \[\leadsto \left(-j\right) \cdot \mathsf{fma}\left(\mathsf{neg}\left(c\right), t, i \cdot y\right) \]
      8. lower-neg.f64N/A

        \[\leadsto \left(-j\right) \cdot \mathsf{fma}\left(-c, t, i \cdot y\right) \]
      9. lift-*.f6439.4

        \[\leadsto \left(-j\right) \cdot \mathsf{fma}\left(-c, t, i \cdot y\right) \]
    7. Applied rewrites39.4%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-1, a \cdot \left(t \cdot x\right), \mathsf{fma}\left(c, j \cdot t, y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)\right)\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-1, a \cdot \left(t \cdot x\right), \mathsf{fma}\left(c, j \cdot t, y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)\right)\right) \]
      9. lower-*.f6458.4

        \[\leadsto \mathsf{fma}\left(-1, a \cdot \left(t \cdot x\right), \mathsf{fma}\left(c, j \cdot t, y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)\right)\right) \]
    10. Applied rewrites58.4%

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

    if 3.19999999999999986e-102 < b < 7.5000000000000004e97

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(j \cdot t, c, \left(z \cdot y\right) \cdot x\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
      7. lift-*.f6466.4

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(j \cdot t, c, \left(z \cdot y\right) \cdot x\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
    7. Applied rewrites66.4%

      \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(j \cdot t, c, \left(z \cdot y\right) \cdot x\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 4: 70.7% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq -8.5 \cdot 10^{-243}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x - t\_1\\

\mathbf{elif}\;z \leq 1.38 \cdot 10^{-207}:\\
\;\;\;\;\mathsf{fma}\left(-1, a \cdot \left(t \cdot x\right), \mathsf{fma}\left(c, j \cdot t, y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)\right)\right)\\

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

\mathbf{elif}\;z \leq 4 \cdot 10^{+188}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot x, z, \left(-i\right) \cdot \left(j \cdot y\right)\right) - t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if z < -5.80000000000000014e119

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. lower-fma.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6441.1

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites41.1%

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

    if -5.80000000000000014e119 < z < -8.5000000000000002e-243

    1. Initial program 73.0%

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-a\right) \cdot \left(t \cdot x\right) + x \cdot \left(y \cdot z\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
      4. associate-*r*N/A

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

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

        \[\leadsto \left(\left(\left(-1 \cdot a\right) \cdot t\right) \cdot x + x \cdot \left(y \cdot z\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
      7. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot \left(a \cdot t\right)\right) \cdot x + x \cdot \left(y \cdot z\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
      8. *-commutativeN/A

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t + y \cdot z\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      13. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t + y \cdot z\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      14. lift-neg.f64N/A

        \[\leadsto \left(\left(-a\right) \cdot t + y \cdot z\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      17. lift-*.f6459.7

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

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

    if -8.5000000000000002e-243 < z < 1.38000000000000007e-207

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-j\right) \cdot \left(\left(-1 \cdot c\right) \cdot t + i \cdot y\right) \]
      6. lower-fma.f64N/A

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

        \[\leadsto \left(-j\right) \cdot \mathsf{fma}\left(\mathsf{neg}\left(c\right), t, i \cdot y\right) \]
      8. lower-neg.f64N/A

        \[\leadsto \left(-j\right) \cdot \mathsf{fma}\left(-c, t, i \cdot y\right) \]
      9. lift-*.f6439.4

        \[\leadsto \left(-j\right) \cdot \mathsf{fma}\left(-c, t, i \cdot y\right) \]
    7. Applied rewrites39.4%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-1, a \cdot \left(t \cdot x\right), \mathsf{fma}\left(c, j \cdot t, y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)\right)\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-1, a \cdot \left(t \cdot x\right), \mathsf{fma}\left(c, j \cdot t, y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)\right)\right) \]
      9. lower-*.f6458.4

        \[\leadsto \mathsf{fma}\left(-1, a \cdot \left(t \cdot x\right), \mathsf{fma}\left(c, j \cdot t, y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)\right)\right) \]
    10. Applied rewrites58.4%

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

    if 1.38000000000000007e-207 < z < 5.5000000000000003e41

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(b \cdot i\right)\right) \]
    4. Applied rewrites58.3%

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

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

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

        \[\leadsto \mathsf{fma}\left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right), a, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right), a, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      4. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(t\right)\right) \cdot x - -1 \cdot \left(b \cdot i\right), a, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      7. lower-neg.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(\mathsf{neg}\left(b \cdot i\right)\right), a, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      9. lower-neg.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      13. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      14. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      16. lift-*.f6460.0

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
    7. Applied rewrites60.0%

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

    if 5.5000000000000003e41 < z < 4.0000000000000001e188

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \left(\left(x \cdot y\right) \cdot z + -1 \cdot \left(i \cdot \left(j \cdot y\right)\right)\right) - b \cdot \left(c \cdot z - a \cdot i\right) \]
      4. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(y \cdot x, z, -1 \cdot \left(i \cdot \left(j \cdot y\right)\right)\right) - b \cdot \left(c \cdot z - a \cdot i\right) \]
      6. lower-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(y \cdot x, z, \left(-1 \cdot i\right) \cdot \left(j \cdot y\right)\right) - b \cdot \left(c \cdot z - a \cdot i\right) \]
      8. lower-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(y \cdot x, z, \left(\mathsf{neg}\left(i\right)\right) \cdot \left(j \cdot y\right)\right) - b \cdot \left(c \cdot z - a \cdot i\right) \]
      10. lower-neg.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(y \cdot x, z, \left(-i\right) \cdot \left(j \cdot y\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
      14. lower-*.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(y \cdot x, z, \left(-i\right) \cdot \left(j \cdot y\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
      17. lift-*.f6459.0

        \[\leadsto \mathsf{fma}\left(y \cdot x, z, \left(-i\right) \cdot \left(j \cdot y\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
    4. Applied rewrites59.0%

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

    if 4.0000000000000001e188 < z

    1. Initial program 73.0%

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

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

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

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot \color{blue}{z} \]
      3. lower--.f64N/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot z \]
      4. *-commutativeN/A

        \[\leadsto \left(y \cdot x - b \cdot c\right) \cdot z \]
      5. lower-*.f64N/A

        \[\leadsto \left(y \cdot x - b \cdot c\right) \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
      7. lower-*.f6439.9

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
    4. Applied rewrites39.9%

      \[\leadsto \color{blue}{\left(y \cdot x - c \cdot b\right) \cdot z} \]
  3. Recombined 6 regimes into one program.
  4. Add Preprocessing

Alternative 5: 69.6% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -9.0000000000000003e-20 or 3.19999999999999986e-102 < b

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(j \cdot t, c, \left(z \cdot y\right) \cdot x\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
      7. lift-*.f6466.4

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \mathsf{fma}\left(j \cdot t, c, \left(z \cdot y\right) \cdot x\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
    7. Applied rewrites66.4%

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

    if -9.0000000000000003e-20 < b < -7.79999999999999982e-41

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(b \cdot i\right)\right) \]
    4. Applied rewrites58.3%

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

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

        \[\leadsto \left(\left(-1 \cdot \left(t \cdot x\right) + \frac{j \cdot \left(c \cdot t - i \cdot y\right)}{a}\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(\left(-1 \cdot \left(t \cdot x\right) + \frac{j \cdot \left(c \cdot t - i \cdot y\right)}{a}\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot a \]
    7. Applied rewrites58.5%

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

    if -7.79999999999999982e-41 < b < 3.19999999999999986e-102

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-j\right) \cdot \left(\left(-1 \cdot c\right) \cdot t + i \cdot y\right) \]
      6. lower-fma.f64N/A

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

        \[\leadsto \left(-j\right) \cdot \mathsf{fma}\left(\mathsf{neg}\left(c\right), t, i \cdot y\right) \]
      8. lower-neg.f64N/A

        \[\leadsto \left(-j\right) \cdot \mathsf{fma}\left(-c, t, i \cdot y\right) \]
      9. lift-*.f6439.4

        \[\leadsto \left(-j\right) \cdot \mathsf{fma}\left(-c, t, i \cdot y\right) \]
    7. Applied rewrites39.4%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-1, a \cdot \left(t \cdot x\right), \mathsf{fma}\left(c, j \cdot t, y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)\right)\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-1, a \cdot \left(t \cdot x\right), \mathsf{fma}\left(c, j \cdot t, y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)\right)\right) \]
      9. lower-*.f6458.4

        \[\leadsto \mathsf{fma}\left(-1, a \cdot \left(t \cdot x\right), \mathsf{fma}\left(c, j \cdot t, y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)\right)\right) \]
    10. Applied rewrites58.4%

      \[\leadsto \mathsf{fma}\left(-1, \color{blue}{a \cdot \left(t \cdot x\right)}, \mathsf{fma}\left(c, j \cdot t, y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 6: 68.0% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq -1.6 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.12 \cdot 10^{+194}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. lower-fma.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6441.1

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites41.1%

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

    if -5.80000000000000014e119 < z < -1.60000000000000001e-40 or 5.0999999999999998e63 < z < 1.11999999999999994e194

    1. Initial program 73.0%

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-a\right) \cdot \left(t \cdot x\right) + x \cdot \left(y \cdot z\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
      4. associate-*r*N/A

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

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

        \[\leadsto \left(\left(\left(-1 \cdot a\right) \cdot t\right) \cdot x + x \cdot \left(y \cdot z\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
      7. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot \left(a \cdot t\right)\right) \cdot x + x \cdot \left(y \cdot z\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
      8. *-commutativeN/A

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t + y \cdot z\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      13. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t + y \cdot z\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      14. lift-neg.f64N/A

        \[\leadsto \left(\left(-a\right) \cdot t + y \cdot z\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      17. lift-*.f6459.7

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

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

    if -1.60000000000000001e-40 < z < 5.0999999999999998e63

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(b \cdot i\right)\right) \]
    4. Applied rewrites58.3%

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

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

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

        \[\leadsto \mathsf{fma}\left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right), a, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right), a, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      4. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(t\right)\right) \cdot x - -1 \cdot \left(b \cdot i\right), a, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      7. lower-neg.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(\mathsf{neg}\left(b \cdot i\right)\right), a, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      9. lower-neg.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      13. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      14. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      16. lift-*.f6460.0

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
    7. Applied rewrites60.0%

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

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      2. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      3. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      4. fp-cancel-sub-sign-invN/A

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t + \left(\mathsf{neg}\left(i\right)\right) \cdot y\right) \cdot j\right) \]
      5. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \mathsf{fma}\left(c, t, \left(\mathsf{neg}\left(i\right)\right) \cdot y\right) \cdot j\right) \]
      7. lower-neg.f6460.3

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \mathsf{fma}\left(c, t, \left(-i\right) \cdot y\right) \cdot j\right) \]
    9. Applied rewrites60.3%

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

    if 1.11999999999999994e194 < z

    1. Initial program 73.0%

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

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

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

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot \color{blue}{z} \]
      3. lower--.f64N/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot z \]
      4. *-commutativeN/A

        \[\leadsto \left(y \cdot x - b \cdot c\right) \cdot z \]
      5. lower-*.f64N/A

        \[\leadsto \left(y \cdot x - b \cdot c\right) \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
      7. lower-*.f6439.9

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
    4. Applied rewrites39.9%

      \[\leadsto \color{blue}{\left(y \cdot x - c \cdot b\right) \cdot z} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 7: 67.9% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq -1.6 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.12 \cdot 10^{+194}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. lower-fma.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6441.1

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites41.1%

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

    if -5.80000000000000014e119 < z < -1.60000000000000001e-40 or 6.2e41 < z < 1.11999999999999994e194

    1. Initial program 73.0%

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-a\right) \cdot \left(t \cdot x\right) + x \cdot \left(y \cdot z\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
      4. associate-*r*N/A

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

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

        \[\leadsto \left(\left(\left(-1 \cdot a\right) \cdot t\right) \cdot x + x \cdot \left(y \cdot z\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
      7. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot \left(a \cdot t\right)\right) \cdot x + x \cdot \left(y \cdot z\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
      8. *-commutativeN/A

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t + y \cdot z\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      13. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t + y \cdot z\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      14. lift-neg.f64N/A

        \[\leadsto \left(\left(-a\right) \cdot t + y \cdot z\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      17. lift-*.f6459.7

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

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

    if -1.60000000000000001e-40 < z < 6.2e41

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(b \cdot i\right)\right) \]
    4. Applied rewrites58.3%

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

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

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

        \[\leadsto \mathsf{fma}\left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right), a, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right), a, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      4. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(t\right)\right) \cdot x - -1 \cdot \left(b \cdot i\right), a, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      7. lower-neg.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(\mathsf{neg}\left(b \cdot i\right)\right), a, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      9. lower-neg.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      13. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      14. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      16. lift-*.f6460.0

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
    7. Applied rewrites60.0%

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

    if 1.11999999999999994e194 < z

    1. Initial program 73.0%

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

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

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

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot \color{blue}{z} \]
      3. lower--.f64N/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot z \]
      4. *-commutativeN/A

        \[\leadsto \left(y \cdot x - b \cdot c\right) \cdot z \]
      5. lower-*.f64N/A

        \[\leadsto \left(y \cdot x - b \cdot c\right) \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
      7. lower-*.f6439.9

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
    4. Applied rewrites39.9%

      \[\leadsto \color{blue}{\left(y \cdot x - c \cdot b\right) \cdot z} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 8: 63.5% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;z \leq 4 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.1500000000000001e-8 or 5.5000000000000003e41 < z < 4.0000000000000001e188

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \left(\left(x \cdot y\right) \cdot z + -1 \cdot \left(i \cdot \left(j \cdot y\right)\right)\right) - b \cdot \left(c \cdot z - a \cdot i\right) \]
      4. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(y \cdot x, z, -1 \cdot \left(i \cdot \left(j \cdot y\right)\right)\right) - b \cdot \left(c \cdot z - a \cdot i\right) \]
      6. lower-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(y \cdot x, z, \left(-1 \cdot i\right) \cdot \left(j \cdot y\right)\right) - b \cdot \left(c \cdot z - a \cdot i\right) \]
      8. lower-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(y \cdot x, z, \left(\mathsf{neg}\left(i\right)\right) \cdot \left(j \cdot y\right)\right) - b \cdot \left(c \cdot z - a \cdot i\right) \]
      10. lower-neg.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(y \cdot x, z, \left(-i\right) \cdot \left(j \cdot y\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
      14. lower-*.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(y \cdot x, z, \left(-i\right) \cdot \left(j \cdot y\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
      17. lift-*.f6459.0

        \[\leadsto \mathsf{fma}\left(y \cdot x, z, \left(-i\right) \cdot \left(j \cdot y\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
    4. Applied rewrites59.0%

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

    if -2.1500000000000001e-8 < z < 5.5000000000000003e41

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(b \cdot i\right)\right) \]
    4. Applied rewrites58.3%

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

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

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

        \[\leadsto \mathsf{fma}\left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right), a, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right), a, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      4. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(t\right)\right) \cdot x - -1 \cdot \left(b \cdot i\right), a, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      7. lower-neg.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(\mathsf{neg}\left(b \cdot i\right)\right), a, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      9. lower-neg.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      13. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      14. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      16. lift-*.f6460.0

        \[\leadsto \mathsf{fma}\left(\left(-t\right) \cdot x - \left(-i \cdot b\right), a, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
    7. Applied rewrites60.0%

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

    if 4.0000000000000001e188 < z

    1. Initial program 73.0%

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

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

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

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot \color{blue}{z} \]
      3. lower--.f64N/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot z \]
      4. *-commutativeN/A

        \[\leadsto \left(y \cdot x - b \cdot c\right) \cdot z \]
      5. lower-*.f64N/A

        \[\leadsto \left(y \cdot x - b \cdot c\right) \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
      7. lower-*.f6439.9

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
    4. Applied rewrites39.9%

      \[\leadsto \color{blue}{\left(y \cdot x - c \cdot b\right) \cdot z} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 9: 62.9% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq -8.5 \cdot 10^{-243}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.12 \cdot 10^{+194}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. lower-fma.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6441.1

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites41.1%

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

    if -5.80000000000000014e119 < z < -8.5000000000000002e-243 or 1.85e-20 < z < 1.11999999999999994e194

    1. Initial program 73.0%

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-a\right) \cdot \left(t \cdot x\right) + x \cdot \left(y \cdot z\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
      4. associate-*r*N/A

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

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

        \[\leadsto \left(\left(\left(-1 \cdot a\right) \cdot t\right) \cdot x + x \cdot \left(y \cdot z\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
      7. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot \left(a \cdot t\right)\right) \cdot x + x \cdot \left(y \cdot z\right)\right) - \left(c \cdot z - i \cdot a\right) \cdot b \]
      8. *-commutativeN/A

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t + y \cdot z\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      13. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t + y \cdot z\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      14. lift-neg.f64N/A

        \[\leadsto \left(\left(-a\right) \cdot t + y \cdot z\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      17. lift-*.f6459.7

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

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

    if -8.5000000000000002e-243 < z < 1.85e-20

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      7. lower-*.f64N/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      13. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      14. lift-*.f6461.2

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
    4. Applied rewrites61.2%

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

    if 1.11999999999999994e194 < z

    1. Initial program 73.0%

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

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

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

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot \color{blue}{z} \]
      3. lower--.f64N/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot z \]
      4. *-commutativeN/A

        \[\leadsto \left(y \cdot x - b \cdot c\right) \cdot z \]
      5. lower-*.f64N/A

        \[\leadsto \left(y \cdot x - b \cdot c\right) \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
      7. lower-*.f6439.9

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
    4. Applied rewrites39.9%

      \[\leadsto \color{blue}{\left(y \cdot x - c \cdot b\right) \cdot z} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 10: 62.8% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_1 := c \cdot t - i \cdot y\\
t_2 := z \cdot y - a \cdot t\\
\mathbf{if}\;x \leq -3.2 \cdot 10^{+77}:\\
\;\;\;\;t\_2 \cdot x\\

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_2, x, t\_1 \cdot j\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.2000000000000002e77

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      5. lift-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      6. lower-*.f6440.2

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
    7. Applied rewrites40.2%

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

    if -3.2000000000000002e77 < x < 3.49999999999999994e-112

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(b \cdot i\right)\right) \]
    4. Applied rewrites58.3%

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

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right) \]
      5. lift-*.f64N/A

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a \cdot \left(i \cdot b\right)\right)\right) \]
      8. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a \cdot \left(i \cdot b\right)\right)\right) \]
      9. distribute-lft-neg-outN/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(i \cdot \color{blue}{b}\right) \]
      10. fp-cancel-sign-subN/A

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j + a \cdot \left(i \cdot b\right) \]
      13. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j + a \cdot \left(i \cdot b\right) \]
      14. lift--.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j + a \cdot \left(i \cdot b\right) \]
      15. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j + a \cdot \left(i \cdot b\right) \]
      16. *-commutativeN/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j + a \cdot \left(b \cdot i\right) \]
    7. Applied rewrites49.6%

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

    if 3.49999999999999994e-112 < x

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      7. lower-*.f64N/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      13. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
      14. lift-*.f6461.2

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(c \cdot t - i \cdot y\right) \cdot j\right) \]
    4. Applied rewrites61.2%

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

Alternative 11: 60.6% accurate, 1.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.2000000000000002e77 or 6.19999999999999955e34 < x

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      5. lift-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      6. lower-*.f6440.2

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
    7. Applied rewrites40.2%

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

    if -3.2000000000000002e77 < x < 6.19999999999999955e34

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(b \cdot i\right)\right) \]
    4. Applied rewrites58.3%

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

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right) \]
      5. lift-*.f64N/A

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a \cdot \left(i \cdot b\right)\right)\right) \]
      8. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a \cdot \left(i \cdot b\right)\right)\right) \]
      9. distribute-lft-neg-outN/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(i \cdot \color{blue}{b}\right) \]
      10. fp-cancel-sign-subN/A

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j + a \cdot \left(i \cdot b\right) \]
      13. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j + a \cdot \left(i \cdot b\right) \]
      14. lift--.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j + a \cdot \left(i \cdot b\right) \]
      15. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j + a \cdot \left(i \cdot b\right) \]
      16. *-commutativeN/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j + a \cdot \left(b \cdot i\right) \]
    7. Applied rewrites49.6%

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

Alternative 12: 53.2% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.50000000000000058e45 or 4.80000000000000004e-27 < x

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      5. lift-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      6. lower-*.f6440.2

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
    7. Applied rewrites40.2%

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

    if -7.50000000000000058e45 < x < 4.80000000000000004e-27

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-j\right) \cdot \left(\left(-1 \cdot c\right) \cdot t + i \cdot y\right) \]
      6. lower-fma.f64N/A

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

        \[\leadsto \left(-j\right) \cdot \mathsf{fma}\left(\mathsf{neg}\left(c\right), t, i \cdot y\right) \]
      8. lower-neg.f64N/A

        \[\leadsto \left(-j\right) \cdot \mathsf{fma}\left(-c, t, i \cdot y\right) \]
      9. lift-*.f6439.4

        \[\leadsto \left(-j\right) \cdot \mathsf{fma}\left(-c, t, i \cdot y\right) \]
    7. Applied rewrites39.4%

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

Alternative 13: 53.1% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot y - a \cdot t\right) \cdot x\\ \mathbf{if}\;x \leq -7.5 \cdot 10^{+45}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 4.8 \cdot 10^{-27}:\\ \;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (- (* z y) (* a t)) x)))
   (if (<= x -7.5e+45) t_1 (if (<= x 4.8e-27) (* (- (* c t) (* i y)) j) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((z * y) - (a * t)) * x;
	double tmp;
	if (x <= -7.5e+45) {
		tmp = t_1;
	} else if (x <= 4.8e-27) {
		tmp = ((c * t) - (i * y)) * j;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((z * y) - (a * t)) * x
    if (x <= (-7.5d+45)) then
        tmp = t_1
    else if (x <= 4.8d-27) then
        tmp = ((c * t) - (i * y)) * j
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((z * y) - (a * t)) * x;
	double tmp;
	if (x <= -7.5e+45) {
		tmp = t_1;
	} else if (x <= 4.8e-27) {
		tmp = ((c * t) - (i * y)) * j;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = ((z * y) - (a * t)) * x
	tmp = 0
	if x <= -7.5e+45:
		tmp = t_1
	elif x <= 4.8e-27:
		tmp = ((c * t) - (i * y)) * j
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(Float64(z * y) - Float64(a * t)) * x)
	tmp = 0.0
	if (x <= -7.5e+45)
		tmp = t_1;
	elseif (x <= 4.8e-27)
		tmp = Float64(Float64(Float64(c * t) - Float64(i * y)) * j);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = ((z * y) - (a * t)) * x;
	tmp = 0.0;
	if (x <= -7.5e+45)
		tmp = t_1;
	elseif (x <= 4.8e-27)
		tmp = ((c * t) - (i * y)) * j;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -7.5e+45], t$95$1, If[LessEqual[x, 4.8e-27], N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq 4.8 \cdot 10^{-27}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.50000000000000058e45 or 4.80000000000000004e-27 < x

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      5. lift-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      6. lower-*.f6440.2

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
    7. Applied rewrites40.2%

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

    if -7.50000000000000058e45 < x < 4.80000000000000004e-27

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(b \cdot i\right)\right) \]
    4. Applied rewrites58.3%

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      2. lift--.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      3. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6439.1

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    7. Applied rewrites39.1%

      \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 14: 51.0% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y \cdot x - c \cdot b\right) \cdot z\\ \mathbf{if}\;z \leq -8 \cdot 10^{-40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{-243}:\\ \;\;\;\;\left(i \cdot a - c \cdot z\right) \cdot b\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+63}:\\ \;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (- (* y x) (* c b)) z)))
   (if (<= z -8e-40)
     t_1
     (if (<= z -8.5e-243)
       (* (- (* i a) (* c z)) b)
       (if (<= z 6.5e+63) (* (- (* c t) (* i y)) j) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((y * x) - (c * b)) * z;
	double tmp;
	if (z <= -8e-40) {
		tmp = t_1;
	} else if (z <= -8.5e-243) {
		tmp = ((i * a) - (c * z)) * b;
	} else if (z <= 6.5e+63) {
		tmp = ((c * t) - (i * y)) * j;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((y * x) - (c * b)) * z
    if (z <= (-8d-40)) then
        tmp = t_1
    else if (z <= (-8.5d-243)) then
        tmp = ((i * a) - (c * z)) * b
    else if (z <= 6.5d+63) then
        tmp = ((c * t) - (i * y)) * j
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((y * x) - (c * b)) * z;
	double tmp;
	if (z <= -8e-40) {
		tmp = t_1;
	} else if (z <= -8.5e-243) {
		tmp = ((i * a) - (c * z)) * b;
	} else if (z <= 6.5e+63) {
		tmp = ((c * t) - (i * y)) * j;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = ((y * x) - (c * b)) * z
	tmp = 0
	if z <= -8e-40:
		tmp = t_1
	elif z <= -8.5e-243:
		tmp = ((i * a) - (c * z)) * b
	elif z <= 6.5e+63:
		tmp = ((c * t) - (i * y)) * j
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(Float64(y * x) - Float64(c * b)) * z)
	tmp = 0.0
	if (z <= -8e-40)
		tmp = t_1;
	elseif (z <= -8.5e-243)
		tmp = Float64(Float64(Float64(i * a) - Float64(c * z)) * b);
	elseif (z <= 6.5e+63)
		tmp = Float64(Float64(Float64(c * t) - Float64(i * y)) * j);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = ((y * x) - (c * b)) * z;
	tmp = 0.0;
	if (z <= -8e-40)
		tmp = t_1;
	elseif (z <= -8.5e-243)
		tmp = ((i * a) - (c * z)) * b;
	elseif (z <= 6.5e+63)
		tmp = ((c * t) - (i * y)) * j;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -8e-40], t$95$1, If[LessEqual[z, -8.5e-243], N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[z, 6.5e+63], N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{if}\;z \leq -8 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 6.5 \cdot 10^{+63}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.9999999999999994e-40 or 6.49999999999999992e63 < z

    1. Initial program 73.0%

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

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

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

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot \color{blue}{z} \]
      3. lower--.f64N/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot z \]
      4. *-commutativeN/A

        \[\leadsto \left(y \cdot x - b \cdot c\right) \cdot z \]
      5. lower-*.f64N/A

        \[\leadsto \left(y \cdot x - b \cdot c\right) \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
      7. lower-*.f6439.9

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
    4. Applied rewrites39.9%

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

    if -7.9999999999999994e-40 < z < -8.5000000000000002e-243

    1. Initial program 73.0%

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right) \cdot b \]
      6. sub-negate-revN/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot b \]
      7. lower--.f64N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot b \]
      8. *-commutativeN/A

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      9. lift-*.f64N/A

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      10. lift-*.f6439.2

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
    4. Applied rewrites39.2%

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

    if -8.5000000000000002e-243 < z < 6.49999999999999992e63

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(b \cdot i\right)\right) \]
    4. Applied rewrites58.3%

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      2. lift--.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      3. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6439.1

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    7. Applied rewrites39.1%

      \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 15: 50.9% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(i \cdot a - c \cdot z\right) \cdot b\\ \mathbf{if}\;b \leq -1.3 \cdot 10^{-24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 3.4 \cdot 10^{-88}:\\ \;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (- (* i a) (* c z)) b)))
   (if (<= b -1.3e-24) t_1 (if (<= b 3.4e-88) (* (- (* c t) (* i y)) j) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((i * a) - (c * z)) * b;
	double tmp;
	if (b <= -1.3e-24) {
		tmp = t_1;
	} else if (b <= 3.4e-88) {
		tmp = ((c * t) - (i * y)) * j;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((i * a) - (c * z)) * b
    if (b <= (-1.3d-24)) then
        tmp = t_1
    else if (b <= 3.4d-88) then
        tmp = ((c * t) - (i * y)) * j
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((i * a) - (c * z)) * b;
	double tmp;
	if (b <= -1.3e-24) {
		tmp = t_1;
	} else if (b <= 3.4e-88) {
		tmp = ((c * t) - (i * y)) * j;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = ((i * a) - (c * z)) * b
	tmp = 0
	if b <= -1.3e-24:
		tmp = t_1
	elif b <= 3.4e-88:
		tmp = ((c * t) - (i * y)) * j
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(Float64(i * a) - Float64(c * z)) * b)
	tmp = 0.0
	if (b <= -1.3e-24)
		tmp = t_1;
	elseif (b <= 3.4e-88)
		tmp = Float64(Float64(Float64(c * t) - Float64(i * y)) * j);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = ((i * a) - (c * z)) * b;
	tmp = 0.0;
	if (b <= -1.3e-24)
		tmp = t_1;
	elseif (b <= 3.4e-88)
		tmp = ((c * t) - (i * y)) * j;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -1.3e-24], t$95$1, If[LessEqual[b, 3.4e-88], N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -1.3 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 3.4 \cdot 10^{-88}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.3e-24 or 3.39999999999999975e-88 < b

    1. Initial program 73.0%

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right) \cdot b \]
      6. sub-negate-revN/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot b \]
      7. lower--.f64N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot b \]
      8. *-commutativeN/A

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      9. lift-*.f64N/A

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      10. lift-*.f6439.2

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
    4. Applied rewrites39.2%

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

    if -1.3e-24 < b < 3.39999999999999975e-88

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(b \cdot i\right)\right) \]
    4. Applied rewrites58.3%

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      2. lift--.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      3. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6439.1

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    7. Applied rewrites39.1%

      \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 16: 41.2% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\\ \mathbf{if}\;x \leq -1.05 \cdot 10^{+77}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.5 \cdot 10^{+56}:\\ \;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* -1.0 (* a (* t x)))))
   (if (<= x -1.05e+77)
     t_1
     (if (<= x 2.5e+56) (* (- (* c t) (* i y)) j) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = -1.0 * (a * (t * x));
	double tmp;
	if (x <= -1.05e+77) {
		tmp = t_1;
	} else if (x <= 2.5e+56) {
		tmp = ((c * t) - (i * y)) * j;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (-1.0d0) * (a * (t * x))
    if (x <= (-1.05d+77)) then
        tmp = t_1
    else if (x <= 2.5d+56) then
        tmp = ((c * t) - (i * y)) * j
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = -1.0 * (a * (t * x));
	double tmp;
	if (x <= -1.05e+77) {
		tmp = t_1;
	} else if (x <= 2.5e+56) {
		tmp = ((c * t) - (i * y)) * j;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = -1.0 * (a * (t * x))
	tmp = 0
	if x <= -1.05e+77:
		tmp = t_1
	elif x <= 2.5e+56:
		tmp = ((c * t) - (i * y)) * j
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(-1.0 * Float64(a * Float64(t * x)))
	tmp = 0.0
	if (x <= -1.05e+77)
		tmp = t_1;
	elseif (x <= 2.5e+56)
		tmp = Float64(Float64(Float64(c * t) - Float64(i * y)) * j);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = -1.0 * (a * (t * x));
	tmp = 0.0;
	if (x <= -1.05e+77)
		tmp = t_1;
	elseif (x <= 2.5e+56)
		tmp = ((c * t) - (i * y)) * j;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(-1.0 * N[(a * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.05e+77], t$95$1, If[LessEqual[x, 2.5e+56], N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := -1 \cdot \left(a \cdot \left(t \cdot x\right)\right)\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.0499999999999999e77 or 2.50000000000000012e56 < x

    1. Initial program 73.0%

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
      3. lower-*.f64N/A

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

        \[\leadsto \left(-a\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
      5. lower--.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x - \color{blue}{b \cdot i}\right) \]
      6. lower-*.f64N/A

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

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x - i \cdot \color{blue}{b}\right) \]
      8. lower-*.f6438.6

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

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(t \cdot x - i \cdot b\right)} \]
    5. Taylor expanded in x around inf

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

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

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot \color{blue}{x}\right)\right) \]
      3. lift-*.f6421.9

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot x\right)\right) \]
    7. Applied rewrites21.9%

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

    if -1.0499999999999999e77 < x < 2.50000000000000012e56

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(b \cdot i\right)\right) \]
    4. Applied rewrites58.3%

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      2. lift--.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      3. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6439.1

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    7. Applied rewrites39.1%

      \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 17: 29.9% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(c \cdot t\right) \cdot j\\ t_2 := \left(\left(-a\right) \cdot t\right) \cdot x\\ \mathbf{if}\;t \leq -4 \cdot 10^{+225}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -900000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{-87}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{+20}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* c t) j)) (t_2 (* (* (- a) t) x)))
   (if (<= t -4e+225)
     t_2
     (if (<= t -900000000000.0)
       t_1
       (if (<= t 1.05e-87) (* (- i) (* j y)) (if (<= t 7.5e+20) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (c * t) * j;
	double t_2 = (-a * t) * x;
	double tmp;
	if (t <= -4e+225) {
		tmp = t_2;
	} else if (t <= -900000000000.0) {
		tmp = t_1;
	} else if (t <= 1.05e-87) {
		tmp = -i * (j * y);
	} else if (t <= 7.5e+20) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (c * t) * j
    t_2 = (-a * t) * x
    if (t <= (-4d+225)) then
        tmp = t_2
    else if (t <= (-900000000000.0d0)) then
        tmp = t_1
    else if (t <= 1.05d-87) then
        tmp = -i * (j * y)
    else if (t <= 7.5d+20) then
        tmp = t_2
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (c * t) * j;
	double t_2 = (-a * t) * x;
	double tmp;
	if (t <= -4e+225) {
		tmp = t_2;
	} else if (t <= -900000000000.0) {
		tmp = t_1;
	} else if (t <= 1.05e-87) {
		tmp = -i * (j * y);
	} else if (t <= 7.5e+20) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (c * t) * j
	t_2 = (-a * t) * x
	tmp = 0
	if t <= -4e+225:
		tmp = t_2
	elif t <= -900000000000.0:
		tmp = t_1
	elif t <= 1.05e-87:
		tmp = -i * (j * y)
	elif t <= 7.5e+20:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(c * t) * j)
	t_2 = Float64(Float64(Float64(-a) * t) * x)
	tmp = 0.0
	if (t <= -4e+225)
		tmp = t_2;
	elseif (t <= -900000000000.0)
		tmp = t_1;
	elseif (t <= 1.05e-87)
		tmp = Float64(Float64(-i) * Float64(j * y));
	elseif (t <= 7.5e+20)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (c * t) * j;
	t_2 = (-a * t) * x;
	tmp = 0.0;
	if (t <= -4e+225)
		tmp = t_2;
	elseif (t <= -900000000000.0)
		tmp = t_1;
	elseif (t <= 1.05e-87)
		tmp = -i * (j * y);
	elseif (t <= 7.5e+20)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[t, -4e+225], t$95$2, If[LessEqual[t, -900000000000.0], t$95$1, If[LessEqual[t, 1.05e-87], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e+20], t$95$2, t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(c \cdot t\right) \cdot j\\
t_2 := \left(\left(-a\right) \cdot t\right) \cdot x\\
\mathbf{if}\;t \leq -4 \cdot 10^{+225}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -900000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.05 \cdot 10^{-87}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\

\mathbf{elif}\;t \leq 7.5 \cdot 10^{+20}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.99999999999999971e225 or 1.05000000000000004e-87 < t < 7.5e20

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(b \cdot i\right)\right) \]
    4. Applied rewrites58.3%

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

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

        \[\leadsto \mathsf{neg}\left(a \cdot \left(t \cdot x\right)\right) \]
      2. distribute-lft-neg-outN/A

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

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) \]
      4. associate-*r*N/A

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
      5. lift-neg.f64N/A

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      7. associate-*r*N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot t\right)\right) \cdot x \]
      8. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot t\right)\right) \cdot x \]
      9. associate-*r*N/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      11. lift-neg.f64N/A

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
      12. lower-*.f6421.8

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
    7. Applied rewrites21.8%

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

    if -3.99999999999999971e225 < t < -9e11 or 7.5e20 < t

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(b \cdot i\right)\right) \]
    4. Applied rewrites58.3%

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      2. lift--.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      3. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6439.1

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    7. Applied rewrites39.1%

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

      \[\leadsto \left(c \cdot t\right) \cdot j \]
    9. Step-by-step derivation
      1. lift-*.f6421.9

        \[\leadsto \left(c \cdot t\right) \cdot j \]
    10. Applied rewrites21.9%

      \[\leadsto \left(c \cdot t\right) \cdot j \]

    if -9e11 < t < 1.05000000000000004e-87

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. lower-fma.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6441.1

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites41.1%

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

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

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

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

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y\right) \]
      5. lower-*.f6422.4

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y\right) \]
    7. Applied rewrites22.4%

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

Alternative 18: 29.6% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(c \cdot t\right) \cdot j\\ \mathbf{if}\;t \leq -900000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{+32}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* c t) j)))
   (if (<= t -900000000000.0) t_1 (if (<= t 4.8e+32) (* (- i) (* j y)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (c * t) * j;
	double tmp;
	if (t <= -900000000000.0) {
		tmp = t_1;
	} else if (t <= 4.8e+32) {
		tmp = -i * (j * y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (c * t) * j
    if (t <= (-900000000000.0d0)) then
        tmp = t_1
    else if (t <= 4.8d+32) then
        tmp = -i * (j * y)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (c * t) * j;
	double tmp;
	if (t <= -900000000000.0) {
		tmp = t_1;
	} else if (t <= 4.8e+32) {
		tmp = -i * (j * y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (c * t) * j
	tmp = 0
	if t <= -900000000000.0:
		tmp = t_1
	elif t <= 4.8e+32:
		tmp = -i * (j * y)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(c * t) * j)
	tmp = 0.0
	if (t <= -900000000000.0)
		tmp = t_1;
	elseif (t <= 4.8e+32)
		tmp = Float64(Float64(-i) * Float64(j * y));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (c * t) * j;
	tmp = 0.0;
	if (t <= -900000000000.0)
		tmp = t_1;
	elseif (t <= 4.8e+32)
		tmp = -i * (j * y);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[t, -900000000000.0], t$95$1, If[LessEqual[t, 4.8e+32], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(c \cdot t\right) \cdot j\\
\mathbf{if}\;t \leq -900000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 4.8 \cdot 10^{+32}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9e11 or 4.79999999999999983e32 < t

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(b \cdot i\right)\right) \]
    4. Applied rewrites58.3%

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      2. lift--.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      3. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6439.1

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    7. Applied rewrites39.1%

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

      \[\leadsto \left(c \cdot t\right) \cdot j \]
    9. Step-by-step derivation
      1. lift-*.f6421.9

        \[\leadsto \left(c \cdot t\right) \cdot j \]
    10. Applied rewrites21.9%

      \[\leadsto \left(c \cdot t\right) \cdot j \]

    if -9e11 < t < 4.79999999999999983e32

    1. Initial program 73.0%

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. lower-fma.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6441.1

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites41.1%

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

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

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

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

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y\right) \]
      5. lower-*.f6422.4

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y\right) \]
    7. Applied rewrites22.4%

      \[\leadsto \left(-i\right) \cdot \color{blue}{\left(j \cdot y\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 19: 29.4% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(c \cdot t\right) \cdot j\\ \mathbf{if}\;c \leq -6 \cdot 10^{+76}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq 1.45 \cdot 10^{+42}:\\ \;\;\;\;\left(i \cdot a\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* c t) j)))
   (if (<= c -6e+76) t_1 (if (<= c 1.45e+42) (* (* i a) b) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (c * t) * j;
	double tmp;
	if (c <= -6e+76) {
		tmp = t_1;
	} else if (c <= 1.45e+42) {
		tmp = (i * a) * b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (c * t) * j
    if (c <= (-6d+76)) then
        tmp = t_1
    else if (c <= 1.45d+42) then
        tmp = (i * a) * b
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (c * t) * j;
	double tmp;
	if (c <= -6e+76) {
		tmp = t_1;
	} else if (c <= 1.45e+42) {
		tmp = (i * a) * b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (c * t) * j
	tmp = 0
	if c <= -6e+76:
		tmp = t_1
	elif c <= 1.45e+42:
		tmp = (i * a) * b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(c * t) * j)
	tmp = 0.0
	if (c <= -6e+76)
		tmp = t_1;
	elseif (c <= 1.45e+42)
		tmp = Float64(Float64(i * a) * b);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (c * t) * j;
	tmp = 0.0;
	if (c <= -6e+76)
		tmp = t_1;
	elseif (c <= 1.45e+42)
		tmp = (i * a) * b;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[c, -6e+76], t$95$1, If[LessEqual[c, 1.45e+42], N[(N[(i * a), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(c \cdot t\right) \cdot j\\
\mathbf{if}\;c \leq -6 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq 1.45 \cdot 10^{+42}:\\
\;\;\;\;\left(i \cdot a\right) \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -5.9999999999999996e76 or 1.4499999999999999e42 < c

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(b \cdot i\right)\right) \]
    4. Applied rewrites58.3%

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      2. lift--.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      3. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6439.1

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    7. Applied rewrites39.1%

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

      \[\leadsto \left(c \cdot t\right) \cdot j \]
    9. Step-by-step derivation
      1. lift-*.f6421.9

        \[\leadsto \left(c \cdot t\right) \cdot j \]
    10. Applied rewrites21.9%

      \[\leadsto \left(c \cdot t\right) \cdot j \]

    if -5.9999999999999996e76 < c < 1.4499999999999999e42

    1. Initial program 73.0%

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right) \cdot b \]
      6. sub-negate-revN/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot b \]
      7. lower--.f64N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot b \]
      8. *-commutativeN/A

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      9. lift-*.f64N/A

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      10. lift-*.f6439.2

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
    4. Applied rewrites39.2%

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

      \[\leadsto \left(a \cdot i\right) \cdot b \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(i \cdot a\right) \cdot b \]
      2. lift-*.f6422.5

        \[\leadsto \left(i \cdot a\right) \cdot b \]
    7. Applied rewrites22.5%

      \[\leadsto \left(i \cdot a\right) \cdot b \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 20: 29.2% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(c \cdot t\right) \cdot j\\ \mathbf{if}\;c \leq -6 \cdot 10^{+76}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq 9.5 \cdot 10^{+33}:\\ \;\;\;\;\left(i \cdot b\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* c t) j)))
   (if (<= c -6e+76) t_1 (if (<= c 9.5e+33) (* (* i b) a) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (c * t) * j;
	double tmp;
	if (c <= -6e+76) {
		tmp = t_1;
	} else if (c <= 9.5e+33) {
		tmp = (i * b) * a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (c * t) * j
    if (c <= (-6d+76)) then
        tmp = t_1
    else if (c <= 9.5d+33) then
        tmp = (i * b) * a
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (c * t) * j;
	double tmp;
	if (c <= -6e+76) {
		tmp = t_1;
	} else if (c <= 9.5e+33) {
		tmp = (i * b) * a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (c * t) * j
	tmp = 0
	if c <= -6e+76:
		tmp = t_1
	elif c <= 9.5e+33:
		tmp = (i * b) * a
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(c * t) * j)
	tmp = 0.0
	if (c <= -6e+76)
		tmp = t_1;
	elseif (c <= 9.5e+33)
		tmp = Float64(Float64(i * b) * a);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (c * t) * j;
	tmp = 0.0;
	if (c <= -6e+76)
		tmp = t_1;
	elseif (c <= 9.5e+33)
		tmp = (i * b) * a;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[c, -6e+76], t$95$1, If[LessEqual[c, 9.5e+33], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(c \cdot t\right) \cdot j\\
\mathbf{if}\;c \leq -6 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq 9.5 \cdot 10^{+33}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -5.9999999999999996e76 or 9.5000000000000003e33 < c

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
      13. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(c \cdot t - i \cdot y\right) \cdot j - \left(\mathsf{neg}\left(a\right)\right) \cdot \left(b \cdot i\right)\right) \]
    4. Applied rewrites58.3%

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      2. lift--.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      3. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6439.1

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    7. Applied rewrites39.1%

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

      \[\leadsto \left(c \cdot t\right) \cdot j \]
    9. Step-by-step derivation
      1. lift-*.f6421.9

        \[\leadsto \left(c \cdot t\right) \cdot j \]
    10. Applied rewrites21.9%

      \[\leadsto \left(c \cdot t\right) \cdot j \]

    if -5.9999999999999996e76 < c < 9.5000000000000003e33

    1. Initial program 73.0%

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right) \cdot b \]
      6. sub-negate-revN/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot b \]
      7. lower--.f64N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot b \]
      8. *-commutativeN/A

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      9. lift-*.f64N/A

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      10. lift-*.f6439.2

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
    4. Applied rewrites39.2%

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

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

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lift-*.f6422.4

        \[\leadsto \left(i \cdot b\right) \cdot a \]
    7. Applied rewrites22.4%

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

Alternative 21: 22.4% accurate, 5.9× speedup?

\[\begin{array}{l} \\ \left(i \cdot b\right) \cdot a \end{array} \]
(FPCore (x y z t a b c i j) :precision binary64 (* (* i b) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return (i * b) * a;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

\\
\left(i \cdot b\right) \cdot a
\end{array}
Derivation
  1. Initial program 73.0%

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

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

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

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

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

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

      \[\leadsto \left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right) \cdot b \]
    6. sub-negate-revN/A

      \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot b \]
    7. lower--.f64N/A

      \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot b \]
    8. *-commutativeN/A

      \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
    9. lift-*.f64N/A

      \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
    10. lift-*.f6439.2

      \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
  4. Applied rewrites39.2%

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

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

      \[\leadsto \left(b \cdot i\right) \cdot a \]
    2. lower-*.f64N/A

      \[\leadsto \left(b \cdot i\right) \cdot a \]
    3. *-commutativeN/A

      \[\leadsto \left(i \cdot b\right) \cdot a \]
    4. lift-*.f6422.4

      \[\leadsto \left(i \cdot b\right) \cdot a \]
  7. Applied rewrites22.4%

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

Reproduce

?
herbie shell --seed 2025134 
(FPCore (x y z t a b c i j)
  :name "Linear.Matrix:det33 from linear-1.19.1.3"
  :precision binary64
  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))