Linear.Matrix:det33 from linear-1.19.1.3

Percentage Accurate: 73.6% → 84.3%
Time: 7.8s
Alternatives: 20
Speedup: 0.5×

Specification

?
\[\begin{array}{l} \\ \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (+
  (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
  (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
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 20 alternatives:

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

Initial Program: 73.6% 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: 84.3% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 91.2%

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

        \[\leadsto \left(-i\right) \cdot \left(\mathsf{fma}\left(j, y, -\frac{z \cdot \left(x \cdot y - b \cdot c\right)}{i}\right) - b \cdot a\right) \]
      4. lower-*.f6455.5

        \[\leadsto \left(-i\right) \cdot \left(\mathsf{fma}\left(j, y, -\frac{z \cdot \left(x \cdot y - b \cdot c\right)}{i}\right) - b \cdot a\right) \]
    6. Applied rewrites55.5%

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

Alternative 2: 63.3% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.72000000000000008e-37

    1. Initial program 68.2%

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

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

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

    if -1.72000000000000008e-37 < t < 1.55e106

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.55e106 < t < 4.89999999999999989e234

    1. Initial program 67.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) + c \cdot \left(j \cdot t\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) + c \cdot \left(j \cdot t\right)\right) - \color{blue}{b \cdot \left(c \cdot z - a \cdot i\right)} \]
      2. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.89999999999999989e234 < t

    1. Initial program 55.5%

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

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

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

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

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

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot \left(y - \frac{c \cdot t}{i}\right)\right) \]
      4. lower-*.f6451.3

        \[\leadsto \left(-i\right) \cdot \left(j \cdot \left(y - \frac{c \cdot t}{i}\right)\right) \]
    6. Applied rewrites51.3%

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

Alternative 3: 60.4% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;j \leq -5.2 \cdot 10^{-227}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;j \leq 5.6 \cdot 10^{+110}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 74.3%

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

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f6465.8

        \[\leadsto \left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right) \]
    4. Applied rewrites65.8%

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

    if -1.00000000000000004e36 < j < -5.20000000000000023e-227 or 3.1e-7 < j < 5.59999999999999973e110

    1. Initial program 74.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \mathsf{fma}\left(-a, i, c \cdot z\right)\right)} \]
    5. Taylor expanded in t 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. lower-*.f6424.2

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot x\right)\right) \]
    7. Applied rewrites24.2%

      \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x\right)\right)} \]
    8. Taylor expanded in y around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, t \cdot x, \left(-b\right) \cdot \mathsf{fma}\left(-1 \cdot a, i, c \cdot z\right)\right) \]
    10. Applied rewrites55.3%

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

    if -5.20000000000000023e-227 < j < 3.1e-7

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y \cdot z, x, \left(-b\right) \cdot \mathsf{fma}\left(-a, i, c \cdot z\right)\right) \]
    6. Step-by-step derivation
      1. lower-*.f6460.3

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

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

    if 5.59999999999999973e110 < j

    1. Initial program 72.4%

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

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

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

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

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

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot \left(y - \frac{c \cdot t}{i}\right)\right) \]
      4. lower-*.f6462.8

        \[\leadsto \left(-i\right) \cdot \left(j \cdot \left(y - \frac{c \cdot t}{i}\right)\right) \]
    6. Applied rewrites62.8%

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

Alternative 4: 66.9% accurate, 1.1× speedup?

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

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

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

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

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


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

    1. Initial program 74.3%

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

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f6466.0

        \[\leadsto \left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right) \]
    4. Applied rewrites66.0%

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

    if -3.99999999999999982e37 < j < -4.3e-117

    1. Initial program 74.2%

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

      \[\leadsto \color{blue}{\left(-1 \cdot \left(a \cdot \left(t \cdot x\right)\right) + c \cdot \left(j \cdot t\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) + c \cdot \left(j \cdot t\right)\right) - \color{blue}{b \cdot \left(c \cdot z - a \cdot i\right)} \]
      2. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.3e-117 < j < 2.19999999999999989e132

    1. Initial program 73.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.19999999999999989e132 < j

    1. Initial program 72.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 i around -inf

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

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

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

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

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot \left(y - \frac{c \cdot t}{i}\right)\right) \]
      4. lower-*.f6464.0

        \[\leadsto \left(-i\right) \cdot \left(j \cdot \left(y - \frac{c \cdot t}{i}\right)\right) \]
    6. Applied rewrites64.0%

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

Alternative 5: 66.9% accurate, 1.2× speedup?

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

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

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

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


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

    1. Initial program 74.3%

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

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f6465.8

        \[\leadsto \left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right) \]
    4. Applied rewrites65.8%

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

    if -1.11999999999999999e36 < j < 2.19999999999999989e132

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.19999999999999989e132 < j

    1. Initial program 72.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 i around -inf

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

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

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

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

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot \left(y - \frac{c \cdot t}{i}\right)\right) \]
      4. lower-*.f6464.0

        \[\leadsto \left(-i\right) \cdot \left(j \cdot \left(y - \frac{c \cdot t}{i}\right)\right) \]
    6. Applied rewrites64.0%

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

Alternative 6: 59.8% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;x \leq -2.5 \cdot 10^{-72}:\\
\;\;\;\;\left(-\left(c \cdot b\right) \cdot z\right) + t\_2\\

\mathbf{elif}\;x \leq 1.25 \cdot 10^{+35}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a + t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -6.4999999999999999e125 or 1.25000000000000005e35 < x

    1. Initial program 71.9%

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

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

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

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

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

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x \]
      5. fp-cancel-sub-sign-invN/A

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

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

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t + y \cdot z\right) \cdot x \]
      11. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x \]
      14. lower-*.f6463.8

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x \]
    4. Applied rewrites63.8%

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

    if -6.4999999999999999e125 < x < -2.4999999999999998e-72

    1. Initial program 75.8%

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

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

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

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

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

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

        \[\leadsto \left(-\left(c \cdot b\right) \cdot z\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
      6. lower-*.f6449.6

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

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

    if -2.4999999999999998e-72 < x < 1.25000000000000005e35

    1. Initial program 74.2%

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

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

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

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

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f6460.4

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

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

Alternative 7: 59.9% accurate, 1.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.4999999999999999e125 or 1.25000000000000005e35 < x

    1. Initial program 71.9%

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

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

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

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

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

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x \]
      5. fp-cancel-sub-sign-invN/A

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

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

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t + y \cdot z\right) \cdot x \]
      11. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x \]
      14. lower-*.f6463.8

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x \]
    4. Applied rewrites63.8%

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

    if -6.4999999999999999e125 < x < 1.25000000000000005e35

    1. Initial program 74.6%

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

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

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

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

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f6457.6

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

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

Alternative 8: 60.0% accurate, 1.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.80000000000000009e-37 or 1.4e114 < t

    1. Initial program 66.1%

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6462.4

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

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

    if -5.80000000000000009e-37 < t < 1.4e114

    1. Initial program 79.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y \cdot z, x, \left(-b\right) \cdot \mathsf{fma}\left(-a, i, c \cdot z\right)\right) \]
    6. Step-by-step derivation
      1. lower-*.f6458.1

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

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

Alternative 9: 45.2% accurate, 1.4× speedup?

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

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

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

\mathbf{elif}\;a \leq -1.5 \cdot 10^{-304}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.9e-47 or 3.2999999999999999e-83 < a

    1. Initial program 69.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \mathsf{fma}\left(-a, i, c \cdot z\right)\right)} \]
    5. Taylor expanded in t 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. lower-*.f6430.9

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot x\right)\right) \]
    7. Applied rewrites30.9%

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

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

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

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(-t, x, b \cdot i\right) \]
      6. lower-*.f6455.2

        \[\leadsto a \cdot \mathsf{fma}\left(-t, x, b \cdot i\right) \]
    10. Applied rewrites55.2%

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

    if -2.9e-47 < a < -3.8000000000000001e-227

    1. Initial program 81.3%

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

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

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot \color{blue}{b} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(a \cdot i + \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      4. *-commutativeN/A

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

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

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

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

        \[\leadsto \mathsf{fma}\left(i, a, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      9. lower-neg.f6434.5

        \[\leadsto \mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b \]
    4. Applied rewrites34.5%

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

    if -3.8000000000000001e-227 < a < -1.5000000000000001e-304

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(y \cdot \color{blue}{z}\right) \]
      2. lower-*.f6424.6

        \[\leadsto x \cdot \left(y \cdot z\right) \]
    7. Applied rewrites24.6%

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

    if -1.5000000000000001e-304 < a < 3.2999999999999999e-83

    1. Initial program 80.2%

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6433.5

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    4. Applied rewrites33.5%

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

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

        \[\leadsto c \cdot \left(j \cdot \color{blue}{t}\right) \]
      2. lower-*.f6427.6

        \[\leadsto c \cdot \left(j \cdot t\right) \]
    7. Applied rewrites27.6%

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 10: 28.9% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;j \leq -7.5 \cdot 10^{-24}:\\
\;\;\;\;\left(c \cdot j\right) \cdot t\\

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

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

\mathbf{elif}\;j \leq 3.5 \cdot 10^{+131}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\

\mathbf{else}:\\
\;\;\;\;c \cdot \left(j \cdot t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if j < -7.50000000000000007e-24

    1. Initial program 74.4%

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6446.0

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    4. Applied rewrites46.0%

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

      \[\leadsto \left(c \cdot j\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f6432.9

        \[\leadsto \left(c \cdot j\right) \cdot t \]
    7. Applied rewrites32.9%

      \[\leadsto \left(c \cdot j\right) \cdot t \]

    if -7.50000000000000007e-24 < j < -2.6999999999999999e-232

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \mathsf{fma}\left(-a, i, c \cdot z\right)\right)} \]
    5. Taylor expanded in t 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. lower-*.f6425.8

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot x\right)\right) \]
    7. Applied rewrites25.8%

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

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

        \[\leadsto \mathsf{neg}\left(b \cdot \left(c \cdot z\right)\right) \]
      2. lower-neg.f64N/A

        \[\leadsto -b \cdot \left(c \cdot z\right) \]
      3. associate-*r*N/A

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

        \[\leadsto -\left(b \cdot c\right) \cdot z \]
      5. lower-*.f6425.5

        \[\leadsto -\left(b \cdot c\right) \cdot z \]
    10. Applied rewrites25.5%

      \[\leadsto -\left(b \cdot c\right) \cdot z \]

    if -2.6999999999999999e-232 < j < 2100

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \mathsf{fma}\left(-a, i, c \cdot z\right)\right)} \]
    5. Taylor expanded in t 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. lower-*.f6425.7

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot x\right)\right) \]
    7. Applied rewrites25.7%

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

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

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

        \[\leadsto \left(x \cdot y\right) \cdot z \]
      3. lift-*.f6424.0

        \[\leadsto \left(x \cdot y\right) \cdot z \]
    10. Applied rewrites24.0%

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

    if 2100 < j < 3.4999999999999999e131

    1. Initial program 76.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \mathsf{fma}\left(-a, i, c \cdot z\right)\right)} \]
    5. Taylor expanded in t 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. lower-*.f6422.5

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot x\right)\right) \]
    7. Applied rewrites22.5%

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

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

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

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot x\right)\right) \]
      4. associate-*r*N/A

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

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

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(t \cdot x\right) \]
      7. lift-neg.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) \]
      8. lift-*.f6422.5

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) \]
    9. Applied rewrites22.5%

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

    if 3.4999999999999999e131 < j

    1. Initial program 72.1%

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6450.6

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    4. Applied rewrites50.6%

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

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

        \[\leadsto c \cdot \left(j \cdot \color{blue}{t}\right) \]
      2. lower-*.f6440.3

        \[\leadsto c \cdot \left(j \cdot t\right) \]
    7. Applied rewrites40.3%

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 11: 52.2% accurate, 1.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.4999999999999999e-14 or 4.3e20 < z

    1. Initial program 66.4%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, x, \left(\mathsf{neg}\left(b\right)\right) \cdot c\right) \cdot z \]
      7. lower-neg.f6458.2

        \[\leadsto \mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z \]
    4. Applied rewrites58.2%

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

    if -1.4999999999999999e-14 < z < -1.3000000000000001e-285

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \mathsf{fma}\left(-a, i, c \cdot z\right)\right)} \]
    5. Taylor expanded in t 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. lower-*.f6425.9

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot x\right)\right) \]
    7. Applied rewrites25.9%

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

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

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

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(-t, x, b \cdot i\right) \]
      6. lower-*.f6447.0

        \[\leadsto a \cdot \mathsf{fma}\left(-t, x, b \cdot i\right) \]
    10. Applied rewrites47.0%

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

    if -1.3000000000000001e-285 < z < 4.3e20

    1. Initial program 80.9%

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6446.0

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    4. Applied rewrites46.0%

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

Alternative 12: 44.0% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
t_1 := a \cdot \mathsf{fma}\left(-t, x, b \cdot i\right)\\
\mathbf{if}\;a \leq -5.2 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.1999999999999996e-139 or 3.2999999999999999e-83 < a

    1. Initial program 70.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \mathsf{fma}\left(-a, i, c \cdot z\right)\right)} \]
    5. Taylor expanded in t 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. lower-*.f6429.2

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot x\right)\right) \]
    7. Applied rewrites29.2%

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

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

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

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(-t, x, b \cdot i\right) \]
      6. lower-*.f6451.9

        \[\leadsto a \cdot \mathsf{fma}\left(-t, x, b \cdot i\right) \]
    10. Applied rewrites51.9%

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

    if -5.1999999999999996e-139 < a < -1.85e-302

    1. Initial program 81.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \mathsf{fma}\left(-a, i, c \cdot z\right)\right)} \]
    5. Taylor expanded in t 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. lower-*.f648.0

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot x\right)\right) \]
    7. Applied rewrites8.0%

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

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

        \[\leadsto \mathsf{neg}\left(b \cdot \left(c \cdot z\right)\right) \]
      2. lower-neg.f64N/A

        \[\leadsto -b \cdot \left(c \cdot z\right) \]
      3. associate-*r*N/A

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

        \[\leadsto -\left(b \cdot c\right) \cdot z \]
      5. lower-*.f6425.8

        \[\leadsto -\left(b \cdot c\right) \cdot z \]
    10. Applied rewrites25.8%

      \[\leadsto -\left(b \cdot c\right) \cdot z \]

    if -1.85e-302 < a < 3.2999999999999999e-83

    1. Initial program 80.3%

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6433.7

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

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

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

        \[\leadsto c \cdot \left(j \cdot \color{blue}{t}\right) \]
      2. lower-*.f6427.7

        \[\leadsto c \cdot \left(j \cdot t\right) \]
    7. Applied rewrites27.7%

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 13: 28.0% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot y\right) \cdot z\\ \mathbf{if}\;z \leq -1.9 \cdot 10^{+262}:\\ \;\;\;\;\left(c \cdot j\right) \cdot t\\ \mathbf{elif}\;z \leq -3.45 \cdot 10^{-15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.42 \cdot 10^{-285}:\\ \;\;\;\;a \cdot \left(b \cdot i\right)\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+43}:\\ \;\;\;\;c \cdot \left(j \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* x y) z)))
   (if (<= z -1.9e+262)
     (* (* c j) t)
     (if (<= z -3.45e-15)
       t_1
       (if (<= z -1.42e-285)
         (* a (* b i))
         (if (<= z 1.7e+43) (* c (* j t)) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (x * y) * z;
	double tmp;
	if (z <= -1.9e+262) {
		tmp = (c * j) * t;
	} else if (z <= -3.45e-15) {
		tmp = t_1;
	} else if (z <= -1.42e-285) {
		tmp = a * (b * i);
	} else if (z <= 1.7e+43) {
		tmp = c * (j * t);
	} 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 = (x * y) * z
    if (z <= (-1.9d+262)) then
        tmp = (c * j) * t
    else if (z <= (-3.45d-15)) then
        tmp = t_1
    else if (z <= (-1.42d-285)) then
        tmp = a * (b * i)
    else if (z <= 1.7d+43) then
        tmp = c * (j * t)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (x * y) * z;
	double tmp;
	if (z <= -1.9e+262) {
		tmp = (c * j) * t;
	} else if (z <= -3.45e-15) {
		tmp = t_1;
	} else if (z <= -1.42e-285) {
		tmp = a * (b * i);
	} else if (z <= 1.7e+43) {
		tmp = c * (j * t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (x * y) * z
	tmp = 0
	if z <= -1.9e+262:
		tmp = (c * j) * t
	elif z <= -3.45e-15:
		tmp = t_1
	elif z <= -1.42e-285:
		tmp = a * (b * i)
	elif z <= 1.7e+43:
		tmp = c * (j * t)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(x * y) * z)
	tmp = 0.0
	if (z <= -1.9e+262)
		tmp = Float64(Float64(c * j) * t);
	elseif (z <= -3.45e-15)
		tmp = t_1;
	elseif (z <= -1.42e-285)
		tmp = Float64(a * Float64(b * i));
	elseif (z <= 1.7e+43)
		tmp = Float64(c * Float64(j * t));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (x * y) * z;
	tmp = 0.0;
	if (z <= -1.9e+262)
		tmp = (c * j) * t;
	elseif (z <= -3.45e-15)
		tmp = t_1;
	elseif (z <= -1.42e-285)
		tmp = a * (b * i);
	elseif (z <= 1.7e+43)
		tmp = c * (j * t);
	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[(x * y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -1.9e+262], N[(N[(c * j), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, -3.45e-15], t$95$1, If[LessEqual[z, -1.42e-285], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e+43], N[(c * N[(j * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(x \cdot y\right) \cdot z\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+262}:\\
\;\;\;\;\left(c \cdot j\right) \cdot t\\

\mathbf{elif}\;z \leq -3.45 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -1.42 \cdot 10^{-285}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\

\mathbf{elif}\;z \leq 1.7 \cdot 10^{+43}:\\
\;\;\;\;c \cdot \left(j \cdot t\right)\\

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


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

    1. Initial program 55.1%

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6429.0

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    4. Applied rewrites29.0%

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

      \[\leadsto \left(c \cdot j\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f6414.6

        \[\leadsto \left(c \cdot j\right) \cdot t \]
    7. Applied rewrites14.6%

      \[\leadsto \left(c \cdot j\right) \cdot t \]

    if -1.90000000000000017e262 < z < -3.45000000000000005e-15 or 1.70000000000000006e43 < z

    1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \mathsf{fma}\left(-a, i, c \cdot z\right)\right)} \]
    5. Taylor expanded in t 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. lower-*.f6419.7

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot x\right)\right) \]
    7. Applied rewrites19.7%

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

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

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

        \[\leadsto \left(x \cdot y\right) \cdot z \]
      3. lift-*.f6431.0

        \[\leadsto \left(x \cdot y\right) \cdot z \]
    10. Applied rewrites31.0%

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

    if -3.45000000000000005e-15 < z < -1.42e-285

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(b \cdot \color{blue}{i}\right) \]
      2. lower-*.f6426.5

        \[\leadsto a \cdot \left(b \cdot i\right) \]
    7. Applied rewrites26.5%

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

    if -1.42e-285 < z < 1.70000000000000006e43

    1. Initial program 80.4%

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6445.8

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    4. Applied rewrites45.8%

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

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

        \[\leadsto c \cdot \left(j \cdot \color{blue}{t}\right) \]
      2. lower-*.f6426.5

        \[\leadsto c \cdot \left(j \cdot t\right) \]
    7. Applied rewrites26.5%

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 14: 52.5% accurate, 2.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.2e19 or 1.02e8 < x

    1. Initial program 73.4%

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

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

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

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

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

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x \]
      5. fp-cancel-sub-sign-invN/A

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

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

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t + y \cdot z\right) \cdot x \]
      11. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x \]
      14. lower-*.f6459.4

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

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

    if -2.2e19 < x < 1.02e8

    1. Initial program 73.8%

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

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

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

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(j \cdot t + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      6. lower-neg.f6446.4

        \[\leadsto \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c \]
    4. Applied rewrites46.4%

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

Alternative 15: 52.1% accurate, 2.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4999999999999999e-14 or 2.8e11 < z

    1. Initial program 66.7%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, x, \left(\mathsf{neg}\left(b\right)\right) \cdot c\right) \cdot z \]
      7. lower-neg.f6457.9

        \[\leadsto \mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z \]
    4. Applied rewrites57.9%

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

    if -1.4999999999999999e-14 < z < 2.8e11

    1. Initial program 80.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \mathsf{fma}\left(-a, i, c \cdot z\right)\right)} \]
    5. Taylor expanded in t 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. lower-*.f6425.5

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot x\right)\right) \]
    7. Applied rewrites25.5%

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

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

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

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(-t, x, b \cdot i\right) \]
      6. lower-*.f6446.3

        \[\leadsto a \cdot \mathsf{fma}\left(-t, x, b \cdot i\right) \]
    10. Applied rewrites46.3%

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

Alternative 16: 52.3% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{if}\;c \leq -7 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -7.0000000000000006e-64 or 2.79999999999999988e-30 < c

    1. Initial program 68.1%

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

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

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

        \[\leadsto \left(j \cdot t - b \cdot z\right) \cdot \color{blue}{c} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \left(j \cdot t + \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(j, t, \left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      6. lower-neg.f6456.5

        \[\leadsto \mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c \]
    4. Applied rewrites56.5%

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

    if -7.0000000000000006e-64 < c < 2.79999999999999988e-30

    1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \mathsf{fma}\left(-a, i, c \cdot z\right)\right)} \]
    5. Taylor expanded in t 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. lower-*.f6426.3

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot x\right)\right) \]
    7. Applied rewrites26.3%

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

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

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

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

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

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

        \[\leadsto a \cdot \mathsf{fma}\left(-t, x, b \cdot i\right) \]
      6. lower-*.f6446.8

        \[\leadsto a \cdot \mathsf{fma}\left(-t, x, b \cdot i\right) \]
    10. Applied rewrites46.8%

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

Alternative 17: 28.9% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;j \leq -7.5 \cdot 10^{-24}:\\
\;\;\;\;\left(c \cdot j\right) \cdot t\\

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

\mathbf{elif}\;j \leq 4.8 \cdot 10^{+24}:\\
\;\;\;\;\left(x \cdot y\right) \cdot z\\

\mathbf{else}:\\
\;\;\;\;c \cdot \left(j \cdot t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if j < -7.50000000000000007e-24

    1. Initial program 74.4%

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6446.0

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    4. Applied rewrites46.0%

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

      \[\leadsto \left(c \cdot j\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f6432.9

        \[\leadsto \left(c \cdot j\right) \cdot t \]
    7. Applied rewrites32.9%

      \[\leadsto \left(c \cdot j\right) \cdot t \]

    if -7.50000000000000007e-24 < j < -2.6999999999999999e-232

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \mathsf{fma}\left(-a, i, c \cdot z\right)\right)} \]
    5. Taylor expanded in t 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. lower-*.f6425.8

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot x\right)\right) \]
    7. Applied rewrites25.8%

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

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

        \[\leadsto \mathsf{neg}\left(b \cdot \left(c \cdot z\right)\right) \]
      2. lower-neg.f64N/A

        \[\leadsto -b \cdot \left(c \cdot z\right) \]
      3. associate-*r*N/A

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

        \[\leadsto -\left(b \cdot c\right) \cdot z \]
      5. lower-*.f6425.5

        \[\leadsto -\left(b \cdot c\right) \cdot z \]
    10. Applied rewrites25.5%

      \[\leadsto -\left(b \cdot c\right) \cdot z \]

    if -2.6999999999999999e-232 < j < 4.8000000000000001e24

    1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \mathsf{fma}\left(-a, i, c \cdot z\right)\right)} \]
    5. Taylor expanded in t 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. lower-*.f6425.8

        \[\leadsto -1 \cdot \left(a \cdot \left(t \cdot x\right)\right) \]
    7. Applied rewrites25.8%

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

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

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

        \[\leadsto \left(x \cdot y\right) \cdot z \]
      3. lift-*.f6423.7

        \[\leadsto \left(x \cdot y\right) \cdot z \]
    10. Applied rewrites23.7%

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

    if 4.8000000000000001e24 < j

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6446.4

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

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

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

        \[\leadsto c \cdot \left(j \cdot \color{blue}{t}\right) \]
      2. lower-*.f6434.0

        \[\leadsto c \cdot \left(j \cdot t\right) \]
    7. Applied rewrites34.0%

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 18: 30.0% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
t_1 := c \cdot \left(j \cdot t\right)\\
\mathbf{if}\;t \leq -6000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -2.6 \cdot 10^{-250}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6e9 or 3.1499999999999999e119 < t

    1. Initial program 64.9%

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

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6465.0

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    4. Applied rewrites65.0%

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

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

        \[\leadsto c \cdot \left(j \cdot \color{blue}{t}\right) \]
      2. lower-*.f6437.3

        \[\leadsto c \cdot \left(j \cdot t\right) \]
    7. Applied rewrites37.3%

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

    if -6e9 < t < -2.60000000000000008e-250

    1. Initial program 79.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(b \cdot \color{blue}{i}\right) \]
      2. lower-*.f6426.5

        \[\leadsto a \cdot \left(b \cdot i\right) \]
    7. Applied rewrites26.5%

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

    if -2.60000000000000008e-250 < t < 3.1499999999999999e119

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-a, t, y \cdot z\right), x, \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\right)\right) \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\right)\right) \]
    4. Applied rewrites64.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \mathsf{fma}\left(-a, i, c \cdot z\right)\right)} \]
    5. Taylor expanded in y around inf

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \left(y \cdot \color{blue}{z}\right) \]
      2. lower-*.f6424.4

        \[\leadsto x \cdot \left(y \cdot z\right) \]
    7. Applied rewrites24.4%

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 19: 31.0% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c \cdot \left(j \cdot t\right)\\ \mathbf{if}\;t \leq -6000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+48}:\\ \;\;\;\;a \cdot \left(b \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* c (* j t))))
   (if (<= t -6000000000.0) t_1 (if (<= t 1.4e+48) (* a (* b i)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = c * (j * t);
	double tmp;
	if (t <= -6000000000.0) {
		tmp = t_1;
	} else if (t <= 1.4e+48) {
		tmp = a * (b * i);
	} 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 * (j * t)
    if (t <= (-6000000000.0d0)) then
        tmp = t_1
    else if (t <= 1.4d+48) then
        tmp = a * (b * i)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = c * (j * t);
	double tmp;
	if (t <= -6000000000.0) {
		tmp = t_1;
	} else if (t <= 1.4e+48) {
		tmp = a * (b * i);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = c * (j * t)
	tmp = 0
	if t <= -6000000000.0:
		tmp = t_1
	elif t <= 1.4e+48:
		tmp = a * (b * i)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(c * Float64(j * t))
	tmp = 0.0
	if (t <= -6000000000.0)
		tmp = t_1;
	elseif (t <= 1.4e+48)
		tmp = Float64(a * Float64(b * i));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = c * (j * t);
	tmp = 0.0;
	if (t <= -6000000000.0)
		tmp = t_1;
	elseif (t <= 1.4e+48)
		tmp = a * (b * i);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(c * N[(j * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6000000000.0], t$95$1, If[LessEqual[t, 1.4e+48], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := c \cdot \left(j \cdot t\right)\\
\mathbf{if}\;t \leq -6000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.4 \cdot 10^{+48}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6e9 or 1.40000000000000006e48 < t

    1. Initial program 65.5%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6462.8

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    4. Applied rewrites62.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]
    5. Taylor expanded in x around 0

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \left(j \cdot \color{blue}{t}\right) \]
      2. lower-*.f6436.1

        \[\leadsto c \cdot \left(j \cdot t\right) \]
    7. Applied rewrites36.1%

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]

    if -6e9 < t < 1.40000000000000006e48

    1. Initial program 80.5%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in j around 0

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    3. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

        \[\leadsto x \cdot \left(y \cdot z - a \cdot t\right) + \color{blue}{\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x + \color{blue}{\left(\mathsf{neg}\left(b\right)\right)} \cdot \left(c \cdot z - a \cdot i\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x + \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\right) \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, \color{blue}{x}, \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - a \cdot t, x, \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\right)\right) \]
      6. fp-cancel-sub-sign-invN/A

        \[\leadsto \mathsf{fma}\left(y \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot t, x, \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\right)\right) \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(y \cdot z + \left(-1 \cdot a\right) \cdot t, x, \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z + -1 \cdot \left(a \cdot t\right), x, \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-1 \cdot \left(a \cdot t\right) + y \cdot z, x, \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(\left(-1 \cdot a\right) \cdot t + y \cdot z, x, \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\right)\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot t + y \cdot z, x, \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\right)\right) \]
      12. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{neg}\left(a\right), t, y \cdot z\right), x, \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\right)\right) \]
      13. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-a, t, y \cdot z\right), x, \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\right)\right) \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - a \cdot i\right)\right) \]
    4. Applied rewrites65.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \mathsf{fma}\left(-a, i, c \cdot z\right)\right)} \]
    5. Taylor expanded in i around inf

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(b \cdot \color{blue}{i}\right) \]
      2. lower-*.f6426.6

        \[\leadsto a \cdot \left(b \cdot i\right) \]
    7. Applied rewrites26.6%

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 20: 22.7% accurate, 5.5× speedup?

\[\begin{array}{l} \\ c \cdot \left(j \cdot t\right) \end{array} \]
(FPCore (x y z t a b c i j) :precision binary64 (* c (* j t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return c * (j * t);
}
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 = c * (j * t)
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 c * (j * t);
}
def code(x, y, z, t, a, b, c, i, j):
	return c * (j * t)
function code(x, y, z, t, a, b, c, i, j)
	return Float64(c * Float64(j * t))
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = c * (j * t);
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(c * N[(j * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
c \cdot \left(j \cdot t\right)
\end{array}
Derivation
  1. Initial program 73.6%

    \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
  2. Taylor expanded in t around inf

    \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
  3. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
    2. lower-*.f64N/A

      \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
    3. associate-*r*N/A

      \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
    4. mul-1-negN/A

      \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
    5. lower-fma.f64N/A

      \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
    6. lower-neg.f64N/A

      \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
    7. *-commutativeN/A

      \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    8. lower-*.f6440.4

      \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
  4. Applied rewrites40.4%

    \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]
  5. Taylor expanded in x around 0

    \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
  6. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto c \cdot \left(j \cdot \color{blue}{t}\right) \]
    2. lower-*.f6422.7

      \[\leadsto c \cdot \left(j \cdot t\right) \]
  7. Applied rewrites22.7%

    \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
  8. Add Preprocessing

Developer Target 1: 69.3% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\ t_2 := x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\ \mathbf{if}\;t < -8.120978919195912 \cdot 10^{-33}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t < -4.712553818218485 \cdot 10^{-169}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t < -7.633533346031584 \cdot 10^{-308}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t < 1.0535888557455487 \cdot 10^{-139}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1
         (+
          (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
          (/
           (* j (- (pow (* c t) 2.0) (pow (* i y) 2.0)))
           (+ (* c t) (* i y)))))
        (t_2
         (-
          (* x (- (* z y) (* a t)))
          (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j)))))
   (if (< t -8.120978919195912e-33)
     t_2
     (if (< t -4.712553818218485e-169)
       t_1
       (if (< t -7.633533346031584e-308)
         t_2
         (if (< t 1.0535888557455487e-139) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (pow((c * t), 2.0) - pow((i * y), 2.0))) / ((c * t) + (i * y)));
	double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
	double tmp;
	if (t < -8.120978919195912e-33) {
		tmp = t_2;
	} else if (t < -4.712553818218485e-169) {
		tmp = t_1;
	} else if (t < -7.633533346031584e-308) {
		tmp = t_2;
	} else if (t < 1.0535888557455487e-139) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
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 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ** 2.0d0) - ((i * y) ** 2.0d0))) / ((c * t) + (i * y)))
    t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j))
    if (t < (-8.120978919195912d-33)) then
        tmp = t_2
    else if (t < (-4.712553818218485d-169)) then
        tmp = t_1
    else if (t < (-7.633533346031584d-308)) then
        tmp = t_2
    else if (t < 1.0535888557455487d-139) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (Math.pow((c * t), 2.0) - Math.pow((i * y), 2.0))) / ((c * t) + (i * y)));
	double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
	double tmp;
	if (t < -8.120978919195912e-33) {
		tmp = t_2;
	} else if (t < -4.712553818218485e-169) {
		tmp = t_1;
	} else if (t < -7.633533346031584e-308) {
		tmp = t_2;
	} else if (t < 1.0535888557455487e-139) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (math.pow((c * t), 2.0) - math.pow((i * y), 2.0))) / ((c * t) + (i * y)))
	t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j))
	tmp = 0
	if t < -8.120978919195912e-33:
		tmp = t_2
	elif t < -4.712553818218485e-169:
		tmp = t_1
	elif t < -7.633533346031584e-308:
		tmp = t_2
	elif t < 1.0535888557455487e-139:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(Float64(j * Float64((Float64(c * t) ^ 2.0) - (Float64(i * y) ^ 2.0))) / Float64(Float64(c * t) + Float64(i * y))))
	t_2 = Float64(Float64(x * Float64(Float64(z * y) - Float64(a * t))) - Float64(Float64(b * Float64(Float64(z * c) - Float64(a * i))) - Float64(Float64(Float64(c * t) - Float64(y * i)) * j)))
	tmp = 0.0
	if (t < -8.120978919195912e-33)
		tmp = t_2;
	elseif (t < -4.712553818218485e-169)
		tmp = t_1;
	elseif (t < -7.633533346031584e-308)
		tmp = t_2;
	elseif (t < 1.0535888557455487e-139)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ^ 2.0) - ((i * y) ^ 2.0))) / ((c * t) + (i * y)));
	t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
	tmp = 0.0;
	if (t < -8.120978919195912e-33)
		tmp = t_2;
	elseif (t < -4.712553818218485e-169)
		tmp = t_1;
	elseif (t < -7.633533346031584e-308)
		tmp = t_2;
	elseif (t < 1.0535888557455487e-139)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(j * N[(N[Power[N[(c * t), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(i * y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * t), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[(z * c), $MachinePrecision] - N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(c * t), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -8.120978919195912e-33], t$95$2, If[Less[t, -4.712553818218485e-169], t$95$1, If[Less[t, -7.633533346031584e-308], t$95$2, If[Less[t, 1.0535888557455487e-139], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\
t_2 := x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\
\mathbf{if}\;t < -8.120978919195912 \cdot 10^{-33}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t < -4.712553818218485 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t < -7.633533346031584 \cdot 10^{-308}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t < 1.0535888557455487 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2025095 
(FPCore (x y z t a b c i j)
  :name "Linear.Matrix:det33 from linear-1.19.1.3"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< t -1015122364899489/125000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t -942510763643697/2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (if (< t -238547917063487/3125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t 10535888557455487/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))))))))

  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))