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

Percentage Accurate: 74.0% → 82.5%
Time: 6.6s
Alternatives: 24
Speedup: 0.5×

Specification

?
\[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (+
 (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
 (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
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) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j):
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j)
	return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i))))
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)

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 24 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: 74.0% accurate, 1.0× speedup?

\[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (+
 (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
 (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
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) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j):
	return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j)
	return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i))))
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)

Alternative 1: 82.5% accurate, 0.5× speedup?

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

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


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

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 74.0%

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

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

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6438.7%

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

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

Alternative 2: 70.8% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 74.0%

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

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

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

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

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

        \[\leadsto -1 \cdot \left(t \cdot \left(a \cdot x - \color{blue}{b} \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      5. lower-*.f6459.7%

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

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

    if -1e94 < t < -3.8e-140

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

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

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

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

    if -3.8e-140 < t < 1.2500000000000001e35

    1. Initial program 74.0%

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

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

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

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

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

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

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

    if 1.2500000000000001e35 < t

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 70.4% accurate, 1.1× speedup?

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

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

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

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


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.1000000000000001e94

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \mathsf{fma}\left(-1, a \cdot \color{blue}{x}, b \cdot i\right) \]
      4. lower-*.f6438.7%

        \[\leadsto t \cdot \mathsf{fma}\left(-1, a \cdot x, b \cdot i\right) \]
    6. Applied rewrites38.7%

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

    if -1.1000000000000001e94 < t < -3.8e-140

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

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

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

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

    if -3.8e-140 < t < 1.2500000000000001e35

    1. Initial program 74.0%

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

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

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

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

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

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

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

    if 1.2500000000000001e35 < t

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 68.2% accurate, 1.2× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.5000000000000003e-91

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, i \cdot \mathsf{fma}\left(-1, j \cdot \color{blue}{y}, b \cdot t\right)\right) \]
      4. lower-*.f6460.8%

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, i \cdot \mathsf{fma}\left(-1, j \cdot y, b \cdot t\right)\right) \]
    6. Applied rewrites60.8%

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

    if -9.5000000000000003e-91 < t < 1.2500000000000001e35

    1. Initial program 74.0%

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

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

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

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

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

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

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

    if 1.2500000000000001e35 < t

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 67.5% accurate, 1.1× speedup?

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

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

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

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -1.0200000000000001e35 or 3.2499999999999999e209 < j

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

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

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

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

    if -1.0200000000000001e35 < j < 9.7999999999999993e85

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.7999999999999993e85 < j < 3.2499999999999999e209

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(c \cdot a - \color{blue}{i \cdot y}, j, b \cdot \left(i \cdot t\right)\right) \]
      8. lift-*.f6450.5%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(c \cdot a - i \cdot y, j, \left(i \cdot b\right) \cdot t\right) \]
      14. lower-*.f6450.2%

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

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

        \[\leadsto \mathsf{fma}\left(c \cdot a - i \cdot y, j, \left(b \cdot i\right) \cdot t\right) \]
      17. lower-*.f6450.2%

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

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

Alternative 6: 67.3% accurate, 1.2× speedup?

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

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

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


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

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

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

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

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

    if -1.0200000000000001e35 < j < 6.8e-53

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.8e-53 < j

    1. Initial program 74.0%

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

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

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

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

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

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

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

Alternative 7: 64.9% accurate, 0.9× speedup?

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

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

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

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

\mathbf{elif}\;t \leq 1.36 \cdot 10^{+35}:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right) + t\_1\\

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


\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2.6999999999999999e99 or 1.36e35 < t

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \mathsf{fma}\left(-1, a \cdot \color{blue}{x}, b \cdot i\right) \]
      4. lower-*.f6438.7%

        \[\leadsto t \cdot \mathsf{fma}\left(-1, a \cdot x, b \cdot i\right) \]
    6. Applied rewrites38.7%

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

    if -2.6999999999999999e99 < t < -2.7999999999999999e-8

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot b, i, y \cdot \left(x \cdot z - \color{blue}{i} \cdot j\right)\right) \]
      4. lower-*.f6451.7%

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

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

    if -2.7999999999999999e-8 < t < -1.45e-89

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, -1 \cdot \left(i \cdot \color{blue}{\left(j \cdot y\right)}\right)\right) \]
      3. lower-*.f6449.8%

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

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

    if -1.45e-89 < t < -2.8999999999999997e-256

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(y \cdot \color{blue}{z}\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      2. lower-*.f6449.4%

        \[\leadsto x \cdot \left(y \cdot z\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    7. Applied rewrites49.4%

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

    if -2.8999999999999997e-256 < t < 1.36e35

    1. Initial program 74.0%

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

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

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

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

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

Alternative 8: 62.1% accurate, 1.2× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -1.6999999999999999e-127 or 6.7999999999999996e-56 < j

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

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

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

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

    if -1.6999999999999999e-127 < j < 6.7999999999999996e-56

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot b, i, z \cdot \left(x \cdot y - \color{blue}{b} \cdot c\right)\right) \]
      4. lower-*.f6449.8%

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

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

Alternative 9: 61.2% accurate, 1.1× speedup?

\[\begin{array}{l} t_1 := t \cdot \mathsf{fma}\left(-1, a \cdot x, b \cdot i\right)\\ \mathbf{if}\;t \leq -2.7 \cdot 10^{+99}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-8}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot b, i, y \cdot \left(x \cdot z - i \cdot j\right)\right)\\ \mathbf{elif}\;t \leq -1.45 \cdot 10^{-89}:\\ \;\;\;\;\mathsf{fma}\left(z \cdot y - a \cdot t, x, -1 \cdot \left(i \cdot \left(j \cdot y\right)\right)\right)\\ \mathbf{elif}\;t \leq 1.36 \cdot 10^{+35}:\\ \;\;\;\;x \cdot \left(y \cdot z\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (let* ((t_1 (* t (fma -1.0 (* a x) (* b i)))))
  (if (<= t -2.7e+99)
    t_1
    (if (<= t -2.8e-8)
      (fma (* t b) i (* y (- (* x z) (* i j))))
      (if (<= t -1.45e-89)
        (fma (- (* z y) (* a t)) x (* -1.0 (* i (* j y))))
        (if (<= t 1.36e+35)
          (+ (* x (* y z)) (* j (- (* c a) (* y 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 = t * fma(-1.0, (a * x), (b * i));
	double tmp;
	if (t <= -2.7e+99) {
		tmp = t_1;
	} else if (t <= -2.8e-8) {
		tmp = fma((t * b), i, (y * ((x * z) - (i * j))));
	} else if (t <= -1.45e-89) {
		tmp = fma(((z * y) - (a * t)), x, (-1.0 * (i * (j * y))));
	} else if (t <= 1.36e+35) {
		tmp = (x * (y * z)) + (j * ((c * a) - (y * i)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(t * fma(-1.0, Float64(a * x), Float64(b * i)))
	tmp = 0.0
	if (t <= -2.7e+99)
		tmp = t_1;
	elseif (t <= -2.8e-8)
		tmp = fma(Float64(t * b), i, Float64(y * Float64(Float64(x * z) - Float64(i * j))));
	elseif (t <= -1.45e-89)
		tmp = fma(Float64(Float64(z * y) - Float64(a * t)), x, Float64(-1.0 * Float64(i * Float64(j * y))));
	elseif (t <= 1.36e+35)
		tmp = Float64(Float64(x * Float64(y * z)) + Float64(j * Float64(Float64(c * a) - Float64(y * i))));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(t * N[(-1.0 * N[(a * x), $MachinePrecision] + N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.7e+99], t$95$1, If[LessEqual[t, -2.8e-8], N[(N[(t * b), $MachinePrecision] * i + N[(y * N[(N[(x * z), $MachinePrecision] - N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.45e-89], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x + N[(-1.0 * N[(i * N[(j * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.36e+35], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := t \cdot \mathsf{fma}\left(-1, a \cdot x, b \cdot i\right)\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.6999999999999999e99 or 1.36e35 < t

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \mathsf{fma}\left(-1, a \cdot \color{blue}{x}, b \cdot i\right) \]
      4. lower-*.f6438.7%

        \[\leadsto t \cdot \mathsf{fma}\left(-1, a \cdot x, b \cdot i\right) \]
    6. Applied rewrites38.7%

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

    if -2.6999999999999999e99 < t < -2.7999999999999999e-8

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot b, i, y \cdot \left(x \cdot z - \color{blue}{i} \cdot j\right)\right) \]
      4. lower-*.f6451.7%

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

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

    if -2.7999999999999999e-8 < t < -1.45e-89

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, -1 \cdot \left(i \cdot \color{blue}{\left(j \cdot y\right)}\right)\right) \]
      3. lower-*.f6449.8%

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

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

    if -1.45e-89 < t < 1.36e35

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(y \cdot \color{blue}{z}\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      2. lower-*.f6449.4%

        \[\leadsto x \cdot \left(y \cdot z\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    7. Applied rewrites49.4%

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

Alternative 10: 60.6% accurate, 1.4× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -1.0200000000000001e35 or 2.6999999999999998e85 < j

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(y \cdot \color{blue}{z}\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
      2. lower-*.f6449.4%

        \[\leadsto x \cdot \left(y \cdot z\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    7. Applied rewrites49.4%

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

    if -1.0200000000000001e35 < j < 2.6999999999999998e85

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot b, i, z \cdot \left(x \cdot y - \color{blue}{b} \cdot c\right)\right) \]
      4. lower-*.f6449.8%

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

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

Alternative 11: 60.3% accurate, 1.5× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -5.5e6 or 9.7999999999999993e85 < j

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(c \cdot a - \color{blue}{i \cdot y}, j, b \cdot \left(i \cdot t\right)\right) \]
      8. lift-*.f6450.5%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(c \cdot a - i \cdot y, j, \left(i \cdot b\right) \cdot t\right) \]
      14. lower-*.f6450.2%

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

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

        \[\leadsto \mathsf{fma}\left(c \cdot a - i \cdot y, j, \left(b \cdot i\right) \cdot t\right) \]
      17. lower-*.f6450.2%

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

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

    if -5.5e6 < j < 9.7999999999999993e85

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot b, i, z \cdot \left(x \cdot y - \color{blue}{b} \cdot c\right)\right) \]
      4. lower-*.f6449.8%

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

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

Alternative 12: 59.3% accurate, 1.5× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -1.0200000000000001e35 or 9.7999999999999993e85 < j

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j} \cdot y\right) \]
      4. lower-*.f6438.8%

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

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

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

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

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

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

        \[\leadsto -1 \cdot \left(j \cdot \left(i \cdot y - \color{blue}{a} \cdot c\right)\right) \]
      5. lower-*.f6439.2%

        \[\leadsto -1 \cdot \left(j \cdot \left(i \cdot y - a \cdot \color{blue}{c}\right)\right) \]
    10. Applied rewrites39.2%

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

    if -1.0200000000000001e35 < j < 9.7999999999999993e85

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot b, i, z \cdot \left(x \cdot y - \color{blue}{b} \cdot c\right)\right) \]
      4. lower-*.f6449.8%

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

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

Alternative 13: 59.1% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;t \leq 1.55 \cdot 10^{-142}:\\
\;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\

\mathbf{elif}\;t \leq 4.9 \cdot 10^{+107}:\\
\;\;\;\;c \cdot \left(a \cdot j - b \cdot z\right)\\

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


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.0000000000000002e44 or 4.9000000000000001e107 < t

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \mathsf{fma}\left(-1, a \cdot \color{blue}{x}, b \cdot i\right) \]
      4. lower-*.f6438.7%

        \[\leadsto t \cdot \mathsf{fma}\left(-1, a \cdot x, b \cdot i\right) \]
    6. Applied rewrites38.7%

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

    if -2.0000000000000002e44 < t < -6.5000000000000001e-91

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \mathsf{fma}\left(i \cdot t - c \cdot z, b, a \cdot \mathsf{fma}\left(-1, \frac{i \cdot \left(j \cdot y\right)}{a}, c \cdot j\right)\right)\right) \]
      6. lower-*.f6471.8%

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

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

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

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

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

        \[\leadsto x \cdot \left(y \cdot z - \color{blue}{a} \cdot t\right) \]
      4. lower-*.f6438.6%

        \[\leadsto x \cdot \left(y \cdot z - a \cdot \color{blue}{t}\right) \]
    9. Applied rewrites38.6%

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

    if -6.5000000000000001e-91 < t < 1.55e-142

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) \]
    7. Applied rewrites22.1%

      \[\leadsto a \cdot \left(c \cdot \color{blue}{j}\right) \]
    8. Taylor expanded in z around inf

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

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

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

        \[\leadsto z \cdot \left(x \cdot y - \color{blue}{b} \cdot c\right) \]
      4. lower-*.f6438.5%

        \[\leadsto z \cdot \left(x \cdot y - b \cdot \color{blue}{c}\right) \]
    10. Applied rewrites38.5%

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

    if 1.55e-142 < t < 4.9000000000000001e107

    1. Initial program 74.0%

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

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

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6438.7%

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

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

Alternative 14: 51.0% accurate, 1.5× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -2.95e97 or 3.9999999999999999e38 < c

    1. Initial program 74.0%

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

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

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6438.7%

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

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

    if -2.95e97 < c < 3.9999999999999999e38

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(t \cdot b, i, y \cdot \left(x \cdot z - \color{blue}{i} \cdot j\right)\right) \]
      4. lower-*.f6451.7%

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

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

Alternative 15: 50.9% accurate, 2.0× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.6000000000000002e-18 or 1.3999999999999999e-84 < x

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \mathsf{fma}\left(i \cdot t - c \cdot z, b, a \cdot \mathsf{fma}\left(-1, \frac{i \cdot \left(j \cdot y\right)}{a}, c \cdot j\right)\right)\right) \]
      6. lower-*.f6471.8%

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

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

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

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

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

        \[\leadsto x \cdot \left(y \cdot z - \color{blue}{a} \cdot t\right) \]
      4. lower-*.f6438.6%

        \[\leadsto x \cdot \left(y \cdot z - a \cdot \color{blue}{t}\right) \]
    9. Applied rewrites38.6%

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

    if -5.6000000000000002e-18 < x < 1.3999999999999999e-84

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j} \cdot y\right) \]
      4. lower-*.f6438.8%

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

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

        \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j \cdot y}\right) \]
      2. sub-flipN/A

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

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

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

        \[\leadsto i \cdot \left(\left(\mathsf{neg}\left(y \cdot j\right)\right) + b \cdot t\right) \]
      6. distribute-lft-neg-inN/A

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

        \[\leadsto i \cdot \mathsf{fma}\left(\mathsf{neg}\left(y\right), \color{blue}{j}, b \cdot t\right) \]
      8. lower-neg.f6439.1%

        \[\leadsto i \cdot \mathsf{fma}\left(-y, j, b \cdot t\right) \]
    9. Applied rewrites39.1%

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

Alternative 16: 50.5% accurate, 2.0× speedup?

\[\begin{array}{l} t_1 := x \cdot \left(y \cdot z - a \cdot t\right)\\ \mathbf{if}\;x \leq -5.6 \cdot 10^{-18}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{-84}:\\ \;\;\;\;i \cdot \left(b \cdot t - j \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (let* ((t_1 (* x (- (* y z) (* a t)))))
  (if (<= x -5.6e-18)
    t_1
    (if (<= x 1.4e-84) (* i (- (* b t) (* j y))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = x * ((y * z) - (a * t));
	double tmp;
	if (x <= -5.6e-18) {
		tmp = t_1;
	} else if (x <= 1.4e-84) {
		tmp = i * ((b * t) - (j * y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\mathbf{elif}\;x \leq 1.4 \cdot 10^{-84}:\\
\;\;\;\;i \cdot \left(b \cdot t - j \cdot y\right)\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.6000000000000002e-18 or 1.3999999999999999e-84 < x

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \mathsf{fma}\left(i \cdot t - c \cdot z, b, a \cdot \mathsf{fma}\left(-1, \frac{i \cdot \left(j \cdot y\right)}{a}, c \cdot j\right)\right)\right) \]
      6. lower-*.f6471.8%

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

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

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

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

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

        \[\leadsto x \cdot \left(y \cdot z - \color{blue}{a} \cdot t\right) \]
      4. lower-*.f6438.6%

        \[\leadsto x \cdot \left(y \cdot z - a \cdot \color{blue}{t}\right) \]
    9. Applied rewrites38.6%

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

    if -5.6000000000000002e-18 < x < 1.3999999999999999e-84

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j} \cdot y\right) \]
      4. lower-*.f6438.8%

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

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

Alternative 17: 40.2% accurate, 1.9× speedup?

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

\mathbf{elif}\;z \leq 2.15 \cdot 10^{+36}:\\
\;\;\;\;i \cdot \left(b \cdot t - j \cdot y\right)\\

\mathbf{elif}\;z \leq 1.85 \cdot 10^{+126}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\

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


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

    1. Initial program 74.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)} \]
    5. Taylor expanded in x 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-*.f6421.8%

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

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

    if -4.1999999999999998e189 < z < 2.15e36

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j} \cdot y\right) \]
      4. lower-*.f6438.8%

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

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

    if 2.15e36 < z < 1.8499999999999999e126

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) \]
    7. Applied rewrites22.1%

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

    if 1.8499999999999999e126 < z

    1. Initial program 74.0%

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

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

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6438.7%

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

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

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

        \[\leadsto c \cdot \left(-1 \cdot \left(b \cdot \color{blue}{z}\right)\right) \]
      2. lower-*.f6422.0%

        \[\leadsto c \cdot \left(-1 \cdot \left(b \cdot z\right)\right) \]
    7. Applied rewrites22.0%

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

Alternative 18: 29.6% accurate, 1.4× speedup?

\[\begin{array}{l} t_1 := i \cdot \left(b \cdot t\right)\\ \mathbf{if}\;t \leq -3.4 \cdot 10^{+265}:\\ \;\;\;\;a \cdot \left(-1 \cdot \left(t \cdot x\right)\right)\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{+44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-291}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-273}:\\ \;\;\;\;y \cdot \left(-1 \cdot \left(i \cdot j\right)\right)\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-149}:\\ \;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{+63}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (let* ((t_1 (* i (* b t))))
  (if (<= t -3.4e+265)
    (* a (* -1.0 (* t x)))
    (if (<= t -2.1e+44)
      t_1
      (if (<= t 4.4e-291)
        (* x (* y z))
        (if (<= t 5e-273)
          (* y (* -1.0 (* i j)))
          (if (<= t 1.75e-149)
            (* -1.0 (* b (* c z)))
            (if (<= t 8.8e+63) (* a (* c j)) t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = i * (b * t);
	double tmp;
	if (t <= -3.4e+265) {
		tmp = a * (-1.0 * (t * x));
	} else if (t <= -2.1e+44) {
		tmp = t_1;
	} else if (t <= 4.4e-291) {
		tmp = x * (y * z);
	} else if (t <= 5e-273) {
		tmp = y * (-1.0 * (i * j));
	} else if (t <= 1.75e-149) {
		tmp = -1.0 * (b * (c * z));
	} else if (t <= 8.8e+63) {
		tmp = a * (c * j);
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = i * (b * t)
    if (t <= (-3.4d+265)) then
        tmp = a * ((-1.0d0) * (t * x))
    else if (t <= (-2.1d+44)) then
        tmp = t_1
    else if (t <= 4.4d-291) then
        tmp = x * (y * z)
    else if (t <= 5d-273) then
        tmp = y * ((-1.0d0) * (i * j))
    else if (t <= 1.75d-149) then
        tmp = (-1.0d0) * (b * (c * z))
    else if (t <= 8.8d+63) then
        tmp = a * (c * j)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = i * (b * t);
	double tmp;
	if (t <= -3.4e+265) {
		tmp = a * (-1.0 * (t * x));
	} else if (t <= -2.1e+44) {
		tmp = t_1;
	} else if (t <= 4.4e-291) {
		tmp = x * (y * z);
	} else if (t <= 5e-273) {
		tmp = y * (-1.0 * (i * j));
	} else if (t <= 1.75e-149) {
		tmp = -1.0 * (b * (c * z));
	} else if (t <= 8.8e+63) {
		tmp = a * (c * j);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = i * (b * t)
	tmp = 0
	if t <= -3.4e+265:
		tmp = a * (-1.0 * (t * x))
	elif t <= -2.1e+44:
		tmp = t_1
	elif t <= 4.4e-291:
		tmp = x * (y * z)
	elif t <= 5e-273:
		tmp = y * (-1.0 * (i * j))
	elif t <= 1.75e-149:
		tmp = -1.0 * (b * (c * z))
	elif t <= 8.8e+63:
		tmp = a * (c * j)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(i * Float64(b * t))
	tmp = 0.0
	if (t <= -3.4e+265)
		tmp = Float64(a * Float64(-1.0 * Float64(t * x)));
	elseif (t <= -2.1e+44)
		tmp = t_1;
	elseif (t <= 4.4e-291)
		tmp = Float64(x * Float64(y * z));
	elseif (t <= 5e-273)
		tmp = Float64(y * Float64(-1.0 * Float64(i * j)));
	elseif (t <= 1.75e-149)
		tmp = Float64(-1.0 * Float64(b * Float64(c * z)));
	elseif (t <= 8.8e+63)
		tmp = Float64(a * Float64(c * j));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = i * (b * t);
	tmp = 0.0;
	if (t <= -3.4e+265)
		tmp = a * (-1.0 * (t * x));
	elseif (t <= -2.1e+44)
		tmp = t_1;
	elseif (t <= 4.4e-291)
		tmp = x * (y * z);
	elseif (t <= 5e-273)
		tmp = y * (-1.0 * (i * j));
	elseif (t <= 1.75e-149)
		tmp = -1.0 * (b * (c * z));
	elseif (t <= 8.8e+63)
		tmp = a * (c * j);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(i * N[(b * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.4e+265], N[(a * N[(-1.0 * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.1e+44], t$95$1, If[LessEqual[t, 4.4e-291], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e-273], N[(y * N[(-1.0 * N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.75e-149], N[(-1.0 * N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.8e+63], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
t_1 := i \cdot \left(b \cdot t\right)\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{+265}:\\
\;\;\;\;a \cdot \left(-1 \cdot \left(t \cdot x\right)\right)\\

\mathbf{elif}\;t \leq -2.1 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 5 \cdot 10^{-273}:\\
\;\;\;\;y \cdot \left(-1 \cdot \left(i \cdot j\right)\right)\\

\mathbf{elif}\;t \leq 1.75 \cdot 10^{-149}:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)\\

\mathbf{elif}\;t \leq 8.8 \cdot 10^{+63}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\

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


\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -3.3999999999999999e265

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(-1 \cdot \left(t \cdot \color{blue}{x}\right)\right) \]
      2. lower-*.f6422.5%

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

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

    if -3.3999999999999999e265 < t < -2.0999999999999999e44 or 8.7999999999999995e63 < t

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j} \cdot y\right) \]
      4. lower-*.f6438.8%

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

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

      \[\leadsto i \cdot \left(b \cdot \color{blue}{t}\right) \]
    9. Step-by-step derivation
      1. lower-*.f6421.9%

        \[\leadsto i \cdot \left(b \cdot t\right) \]
    10. Applied rewrites21.9%

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

    if -2.0999999999999999e44 < t < 4.4e-291

    1. Initial program 74.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)} \]
    5. Taylor expanded in x 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-*.f6421.8%

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

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

    if 4.4e-291 < t < 4.9999999999999997e-273

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot \color{blue}{j}\right)\right) \]
      2. lower-*.f6422.6%

        \[\leadsto y \cdot \left(-1 \cdot \left(i \cdot j\right)\right) \]
    7. Applied rewrites22.6%

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

    if 4.9999999999999997e-273 < t < 1.75e-149

    1. Initial program 74.0%

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

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

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

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

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6438.7%

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

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

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

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

      \[\leadsto c \cdot \left(a \cdot \color{blue}{j}\right) \]
    8. Taylor expanded in z around inf

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

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

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

        \[\leadsto -1 \cdot \left(b \cdot \left(c \cdot z\right)\right) \]
    10. Applied rewrites22.0%

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

    if 1.75e-149 < t < 8.7999999999999995e63

    1. Initial program 74.0%

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(c \cdot j\right) \]
    7. Applied rewrites22.1%

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

Alternative 19: 29.4% accurate, 1.6× speedup?

\[\begin{array}{l} t_1 := i \cdot \left(b \cdot t\right)\\ \mathbf{if}\;t \leq -3.4 \cdot 10^{+265}:\\ \;\;\;\;a \cdot \left(-1 \cdot \left(t \cdot x\right)\right)\\ \mathbf{elif}\;t \leq -2.1 \cdot 10^{+44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.85 \cdot 10^{-256}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-149}:\\ \;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{+63}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (let* ((t_1 (* i (* b t))))
  (if (<= t -3.4e+265)
    (* a (* -1.0 (* t x)))
    (if (<= t -2.1e+44)
      t_1
      (if (<= t -2.85e-256)
        (* x (* y z))
        (if (<= t 1.75e-149)
          (* -1.0 (* b (* c z)))
          (if (<= t 8.8e+63) (* a (* c j)) t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = i * (b * t);
	double tmp;
	if (t <= -3.4e+265) {
		tmp = a * (-1.0 * (t * x));
	} else if (t <= -2.1e+44) {
		tmp = t_1;
	} else if (t <= -2.85e-256) {
		tmp = x * (y * z);
	} else if (t <= 1.75e-149) {
		tmp = -1.0 * (b * (c * z));
	} else if (t <= 8.8e+63) {
		tmp = a * (c * j);
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = i * (b * t)
    if (t <= (-3.4d+265)) then
        tmp = a * ((-1.0d0) * (t * x))
    else if (t <= (-2.1d+44)) then
        tmp = t_1
    else if (t <= (-2.85d-256)) then
        tmp = x * (y * z)
    else if (t <= 1.75d-149) then
        tmp = (-1.0d0) * (b * (c * z))
    else if (t <= 8.8d+63) then
        tmp = a * (c * j)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = i * (b * t);
	double tmp;
	if (t <= -3.4e+265) {
		tmp = a * (-1.0 * (t * x));
	} else if (t <= -2.1e+44) {
		tmp = t_1;
	} else if (t <= -2.85e-256) {
		tmp = x * (y * z);
	} else if (t <= 1.75e-149) {
		tmp = -1.0 * (b * (c * z));
	} else if (t <= 8.8e+63) {
		tmp = a * (c * j);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = i * (b * t)
	tmp = 0
	if t <= -3.4e+265:
		tmp = a * (-1.0 * (t * x))
	elif t <= -2.1e+44:
		tmp = t_1
	elif t <= -2.85e-256:
		tmp = x * (y * z)
	elif t <= 1.75e-149:
		tmp = -1.0 * (b * (c * z))
	elif t <= 8.8e+63:
		tmp = a * (c * j)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(i * Float64(b * t))
	tmp = 0.0
	if (t <= -3.4e+265)
		tmp = Float64(a * Float64(-1.0 * Float64(t * x)));
	elseif (t <= -2.1e+44)
		tmp = t_1;
	elseif (t <= -2.85e-256)
		tmp = Float64(x * Float64(y * z));
	elseif (t <= 1.75e-149)
		tmp = Float64(-1.0 * Float64(b * Float64(c * z)));
	elseif (t <= 8.8e+63)
		tmp = Float64(a * Float64(c * j));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = i * (b * t);
	tmp = 0.0;
	if (t <= -3.4e+265)
		tmp = a * (-1.0 * (t * x));
	elseif (t <= -2.1e+44)
		tmp = t_1;
	elseif (t <= -2.85e-256)
		tmp = x * (y * z);
	elseif (t <= 1.75e-149)
		tmp = -1.0 * (b * (c * z));
	elseif (t <= 8.8e+63)
		tmp = a * (c * j);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(i * N[(b * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.4e+265], N[(a * N[(-1.0 * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.1e+44], t$95$1, If[LessEqual[t, -2.85e-256], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.75e-149], N[(-1.0 * N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.8e+63], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
t_1 := i \cdot \left(b \cdot t\right)\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{+265}:\\
\;\;\;\;a \cdot \left(-1 \cdot \left(t \cdot x\right)\right)\\

\mathbf{elif}\;t \leq -2.1 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.75 \cdot 10^{-149}:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)\\

\mathbf{elif}\;t \leq 8.8 \cdot 10^{+63}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\

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


\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -3.3999999999999999e265

    1. Initial program 74.0%

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
      2. lower-fma.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(-1, \color{blue}{t \cdot x}, c \cdot j\right) \]
      3. lower-*.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(-1, t \cdot \color{blue}{x}, c \cdot j\right) \]
      4. lower-*.f6439.4%

        \[\leadsto a \cdot \mathsf{fma}\left(-1, t \cdot x, c \cdot j\right) \]
    4. Applied rewrites39.4%

      \[\leadsto \color{blue}{a \cdot \mathsf{fma}\left(-1, t \cdot x, c \cdot j\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto a \cdot \left(-1 \cdot \color{blue}{\left(t \cdot x\right)}\right) \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(-1 \cdot \left(t \cdot \color{blue}{x}\right)\right) \]
      2. lower-*.f6422.5%

        \[\leadsto a \cdot \left(-1 \cdot \left(t \cdot x\right)\right) \]
    7. Applied rewrites22.5%

      \[\leadsto a \cdot \left(-1 \cdot \color{blue}{\left(t \cdot x\right)}\right) \]

    if -3.3999999999999999e265 < t < -2.0999999999999999e44 or 8.7999999999999995e63 < t

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \color{blue}{j \cdot \left(c \cdot a - y \cdot i\right)} \]
      3. fp-cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)} \]
      4. lift--.f64N/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right)} - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
      5. lift-*.f64N/A

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{b \cdot \left(c \cdot z - t \cdot i\right)}\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
      6. fp-cancel-sub-sign-invN/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) + \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right)\right)} - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
      7. associate--l+N/A

        \[\leadsto \color{blue}{x \cdot \left(y \cdot z - t \cdot a\right) + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right)} \]
      8. lift-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(y \cdot z - t \cdot a\right)} + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \color{blue}{\left(y \cdot z - t \cdot a\right) \cdot x} + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right) \]
    3. Applied rewrites77.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \mathsf{fma}\left(i \cdot t - c \cdot z, b, \left(c \cdot a - i \cdot y\right) \cdot j\right)\right)} \]
    4. Applied rewrites74.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot b, i, x \cdot \left(y \cdot z - t \cdot a\right) - \mathsf{fma}\left(i \cdot y - c \cdot a, j, \left(b \cdot c\right) \cdot z\right)\right)} \]
    5. Taylor expanded in i around inf

      \[\leadsto \color{blue}{i \cdot \left(b \cdot t - j \cdot y\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \color{blue}{\left(b \cdot t - j \cdot y\right)} \]
      2. lower--.f64N/A

        \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j \cdot y}\right) \]
      3. lower-*.f64N/A

        \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j} \cdot y\right) \]
      4. lower-*.f6438.8%

        \[\leadsto i \cdot \left(b \cdot t - j \cdot \color{blue}{y}\right) \]
    7. Applied rewrites38.8%

      \[\leadsto \color{blue}{i \cdot \left(b \cdot t - j \cdot y\right)} \]
    8. Taylor expanded in y around 0

      \[\leadsto i \cdot \left(b \cdot \color{blue}{t}\right) \]
    9. Step-by-step derivation
      1. lower-*.f6421.9%

        \[\leadsto i \cdot \left(b \cdot t\right) \]
    10. Applied rewrites21.9%

      \[\leadsto i \cdot \left(b \cdot \color{blue}{t}\right) \]

    if -2.0999999999999999e44 < t < -2.85e-256

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
      2. lower-fma.f64N/A

        \[\leadsto y \cdot \mathsf{fma}\left(-1, \color{blue}{i \cdot j}, x \cdot z\right) \]
      3. lower-*.f64N/A

        \[\leadsto y \cdot \mathsf{fma}\left(-1, i \cdot \color{blue}{j}, x \cdot z\right) \]
      4. lower-*.f6439.0%

        \[\leadsto y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right) \]
    4. Applied rewrites39.0%

      \[\leadsto \color{blue}{y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)} \]
    5. Taylor expanded in x 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-*.f6421.8%

        \[\leadsto x \cdot \left(y \cdot z\right) \]
    7. Applied rewrites21.8%

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]

    if -2.85e-256 < t < 1.75e-149

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Taylor expanded in c around inf

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \color{blue}{\left(a \cdot j - b \cdot z\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b \cdot z}\right) \]
      3. lower-*.f64N/A

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6438.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites38.7%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    5. Taylor expanded in z around 0

      \[\leadsto c \cdot \left(a \cdot \color{blue}{j}\right) \]
    6. Step-by-step derivation
      1. lower-*.f6421.9%

        \[\leadsto c \cdot \left(a \cdot j\right) \]
    7. Applied rewrites21.9%

      \[\leadsto c \cdot \left(a \cdot \color{blue}{j}\right) \]
    8. Taylor expanded in z around inf

      \[\leadsto -1 \cdot \color{blue}{\left(b \cdot \left(c \cdot z\right)\right)} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(b \cdot \color{blue}{\left(c \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(b \cdot \left(c \cdot \color{blue}{z}\right)\right) \]
      3. lower-*.f6422.0%

        \[\leadsto -1 \cdot \left(b \cdot \left(c \cdot z\right)\right) \]
    10. Applied rewrites22.0%

      \[\leadsto -1 \cdot \color{blue}{\left(b \cdot \left(c \cdot z\right)\right)} \]

    if 1.75e-149 < t < 8.7999999999999995e63

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
      2. lower-fma.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(-1, \color{blue}{t \cdot x}, c \cdot j\right) \]
      3. lower-*.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(-1, t \cdot \color{blue}{x}, c \cdot j\right) \]
      4. lower-*.f6439.4%

        \[\leadsto a \cdot \mathsf{fma}\left(-1, t \cdot x, c \cdot j\right) \]
    4. Applied rewrites39.4%

      \[\leadsto \color{blue}{a \cdot \mathsf{fma}\left(-1, t \cdot x, c \cdot j\right)} \]
    5. Taylor expanded in x around 0

      \[\leadsto a \cdot \left(c \cdot \color{blue}{j}\right) \]
    6. Step-by-step derivation
      1. lower-*.f6422.1%

        \[\leadsto a \cdot \left(c \cdot j\right) \]
    7. Applied rewrites22.1%

      \[\leadsto a \cdot \left(c \cdot \color{blue}{j}\right) \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 20: 29.2% accurate, 1.8× speedup?

\[\begin{array}{l} t_1 := i \cdot \left(b \cdot t\right)\\ \mathbf{if}\;t \leq -2.1 \cdot 10^{+44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.85 \cdot 10^{-256}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-149}:\\ \;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{+63}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (let* ((t_1 (* i (* b t))))
  (if (<= t -2.1e+44)
    t_1
    (if (<= t -2.85e-256)
      (* x (* y z))
      (if (<= t 1.75e-149)
        (* -1.0 (* b (* c z)))
        (if (<= t 8.8e+63) (* a (* c j)) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = i * (b * t);
	double tmp;
	if (t <= -2.1e+44) {
		tmp = t_1;
	} else if (t <= -2.85e-256) {
		tmp = x * (y * z);
	} else if (t <= 1.75e-149) {
		tmp = -1.0 * (b * (c * z));
	} else if (t <= 8.8e+63) {
		tmp = a * (c * j);
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = i * (b * t)
    if (t <= (-2.1d+44)) then
        tmp = t_1
    else if (t <= (-2.85d-256)) then
        tmp = x * (y * z)
    else if (t <= 1.75d-149) then
        tmp = (-1.0d0) * (b * (c * z))
    else if (t <= 8.8d+63) then
        tmp = a * (c * j)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = i * (b * t);
	double tmp;
	if (t <= -2.1e+44) {
		tmp = t_1;
	} else if (t <= -2.85e-256) {
		tmp = x * (y * z);
	} else if (t <= 1.75e-149) {
		tmp = -1.0 * (b * (c * z));
	} else if (t <= 8.8e+63) {
		tmp = a * (c * j);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = i * (b * t)
	tmp = 0
	if t <= -2.1e+44:
		tmp = t_1
	elif t <= -2.85e-256:
		tmp = x * (y * z)
	elif t <= 1.75e-149:
		tmp = -1.0 * (b * (c * z))
	elif t <= 8.8e+63:
		tmp = a * (c * j)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(i * Float64(b * t))
	tmp = 0.0
	if (t <= -2.1e+44)
		tmp = t_1;
	elseif (t <= -2.85e-256)
		tmp = Float64(x * Float64(y * z));
	elseif (t <= 1.75e-149)
		tmp = Float64(-1.0 * Float64(b * Float64(c * z)));
	elseif (t <= 8.8e+63)
		tmp = Float64(a * Float64(c * j));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = i * (b * t);
	tmp = 0.0;
	if (t <= -2.1e+44)
		tmp = t_1;
	elseif (t <= -2.85e-256)
		tmp = x * (y * z);
	elseif (t <= 1.75e-149)
		tmp = -1.0 * (b * (c * z));
	elseif (t <= 8.8e+63)
		tmp = a * (c * j);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(i * N[(b * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e+44], t$95$1, If[LessEqual[t, -2.85e-256], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.75e-149], N[(-1.0 * N[(b * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.8e+63], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := i \cdot \left(b \cdot t\right)\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -2.85 \cdot 10^{-256}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\

\mathbf{elif}\;t \leq 1.75 \cdot 10^{-149}:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(c \cdot z\right)\right)\\

\mathbf{elif}\;t \leq 8.8 \cdot 10^{+63}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.0999999999999999e44 or 8.7999999999999995e63 < t

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \color{blue}{j \cdot \left(c \cdot a - y \cdot i\right)} \]
      3. fp-cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)} \]
      4. lift--.f64N/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right)} - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
      5. lift-*.f64N/A

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{b \cdot \left(c \cdot z - t \cdot i\right)}\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
      6. fp-cancel-sub-sign-invN/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) + \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right)\right)} - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
      7. associate--l+N/A

        \[\leadsto \color{blue}{x \cdot \left(y \cdot z - t \cdot a\right) + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right)} \]
      8. lift-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(y \cdot z - t \cdot a\right)} + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \color{blue}{\left(y \cdot z - t \cdot a\right) \cdot x} + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right) \]
    3. Applied rewrites77.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \mathsf{fma}\left(i \cdot t - c \cdot z, b, \left(c \cdot a - i \cdot y\right) \cdot j\right)\right)} \]
    4. Applied rewrites74.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot b, i, x \cdot \left(y \cdot z - t \cdot a\right) - \mathsf{fma}\left(i \cdot y - c \cdot a, j, \left(b \cdot c\right) \cdot z\right)\right)} \]
    5. Taylor expanded in i around inf

      \[\leadsto \color{blue}{i \cdot \left(b \cdot t - j \cdot y\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \color{blue}{\left(b \cdot t - j \cdot y\right)} \]
      2. lower--.f64N/A

        \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j \cdot y}\right) \]
      3. lower-*.f64N/A

        \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j} \cdot y\right) \]
      4. lower-*.f6438.8%

        \[\leadsto i \cdot \left(b \cdot t - j \cdot \color{blue}{y}\right) \]
    7. Applied rewrites38.8%

      \[\leadsto \color{blue}{i \cdot \left(b \cdot t - j \cdot y\right)} \]
    8. Taylor expanded in y around 0

      \[\leadsto i \cdot \left(b \cdot \color{blue}{t}\right) \]
    9. Step-by-step derivation
      1. lower-*.f6421.9%

        \[\leadsto i \cdot \left(b \cdot t\right) \]
    10. Applied rewrites21.9%

      \[\leadsto i \cdot \left(b \cdot \color{blue}{t}\right) \]

    if -2.0999999999999999e44 < t < -2.85e-256

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
      2. lower-fma.f64N/A

        \[\leadsto y \cdot \mathsf{fma}\left(-1, \color{blue}{i \cdot j}, x \cdot z\right) \]
      3. lower-*.f64N/A

        \[\leadsto y \cdot \mathsf{fma}\left(-1, i \cdot \color{blue}{j}, x \cdot z\right) \]
      4. lower-*.f6439.0%

        \[\leadsto y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right) \]
    4. Applied rewrites39.0%

      \[\leadsto \color{blue}{y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)} \]
    5. Taylor expanded in x 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-*.f6421.8%

        \[\leadsto x \cdot \left(y \cdot z\right) \]
    7. Applied rewrites21.8%

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]

    if -2.85e-256 < t < 1.75e-149

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Taylor expanded in c around inf

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \color{blue}{\left(a \cdot j - b \cdot z\right)} \]
      2. lower--.f64N/A

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b \cdot z}\right) \]
      3. lower-*.f64N/A

        \[\leadsto c \cdot \left(a \cdot j - \color{blue}{b} \cdot z\right) \]
      4. lower-*.f6438.7%

        \[\leadsto c \cdot \left(a \cdot j - b \cdot \color{blue}{z}\right) \]
    4. Applied rewrites38.7%

      \[\leadsto \color{blue}{c \cdot \left(a \cdot j - b \cdot z\right)} \]
    5. Taylor expanded in z around 0

      \[\leadsto c \cdot \left(a \cdot \color{blue}{j}\right) \]
    6. Step-by-step derivation
      1. lower-*.f6421.9%

        \[\leadsto c \cdot \left(a \cdot j\right) \]
    7. Applied rewrites21.9%

      \[\leadsto c \cdot \left(a \cdot \color{blue}{j}\right) \]
    8. Taylor expanded in z around inf

      \[\leadsto -1 \cdot \color{blue}{\left(b \cdot \left(c \cdot z\right)\right)} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(b \cdot \color{blue}{\left(c \cdot z\right)}\right) \]
      2. lower-*.f64N/A

        \[\leadsto -1 \cdot \left(b \cdot \left(c \cdot \color{blue}{z}\right)\right) \]
      3. lower-*.f6422.0%

        \[\leadsto -1 \cdot \left(b \cdot \left(c \cdot z\right)\right) \]
    10. Applied rewrites22.0%

      \[\leadsto -1 \cdot \color{blue}{\left(b \cdot \left(c \cdot z\right)\right)} \]

    if 1.75e-149 < t < 8.7999999999999995e63

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
      2. lower-fma.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(-1, \color{blue}{t \cdot x}, c \cdot j\right) \]
      3. lower-*.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(-1, t \cdot \color{blue}{x}, c \cdot j\right) \]
      4. lower-*.f6439.4%

        \[\leadsto a \cdot \mathsf{fma}\left(-1, t \cdot x, c \cdot j\right) \]
    4. Applied rewrites39.4%

      \[\leadsto \color{blue}{a \cdot \mathsf{fma}\left(-1, t \cdot x, c \cdot j\right)} \]
    5. Taylor expanded in x around 0

      \[\leadsto a \cdot \left(c \cdot \color{blue}{j}\right) \]
    6. Step-by-step derivation
      1. lower-*.f6422.1%

        \[\leadsto a \cdot \left(c \cdot j\right) \]
    7. Applied rewrites22.1%

      \[\leadsto a \cdot \left(c \cdot \color{blue}{j}\right) \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 21: 29.1% accurate, 2.2× speedup?

\[\begin{array}{l} t_1 := i \cdot \left(b \cdot t\right)\\ \mathbf{if}\;t \leq -2.1 \cdot 10^{+44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.95 \cdot 10^{-148}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{+63}:\\ \;\;\;\;a \cdot \left(c \cdot j\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (let* ((t_1 (* i (* b t))))
  (if (<= t -2.1e+44)
    t_1
    (if (<= t 2.95e-148)
      (* x (* y z))
      (if (<= t 8.8e+63) (* a (* c j)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = i * (b * t);
	double tmp;
	if (t <= -2.1e+44) {
		tmp = t_1;
	} else if (t <= 2.95e-148) {
		tmp = x * (y * z);
	} else if (t <= 8.8e+63) {
		tmp = a * (c * j);
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = i * (b * t)
    if (t <= (-2.1d+44)) then
        tmp = t_1
    else if (t <= 2.95d-148) then
        tmp = x * (y * z)
    else if (t <= 8.8d+63) then
        tmp = a * (c * j)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = i * (b * t);
	double tmp;
	if (t <= -2.1e+44) {
		tmp = t_1;
	} else if (t <= 2.95e-148) {
		tmp = x * (y * z);
	} else if (t <= 8.8e+63) {
		tmp = a * (c * j);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = i * (b * t)
	tmp = 0
	if t <= -2.1e+44:
		tmp = t_1
	elif t <= 2.95e-148:
		tmp = x * (y * z)
	elif t <= 8.8e+63:
		tmp = a * (c * j)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(i * Float64(b * t))
	tmp = 0.0
	if (t <= -2.1e+44)
		tmp = t_1;
	elseif (t <= 2.95e-148)
		tmp = Float64(x * Float64(y * z));
	elseif (t <= 8.8e+63)
		tmp = Float64(a * Float64(c * j));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = i * (b * t);
	tmp = 0.0;
	if (t <= -2.1e+44)
		tmp = t_1;
	elseif (t <= 2.95e-148)
		tmp = x * (y * z);
	elseif (t <= 8.8e+63)
		tmp = a * (c * j);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(i * N[(b * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e+44], t$95$1, If[LessEqual[t, 2.95e-148], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.8e+63], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := i \cdot \left(b \cdot t\right)\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.95 \cdot 10^{-148}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\

\mathbf{elif}\;t \leq 8.8 \cdot 10^{+63}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.0999999999999999e44 or 8.7999999999999995e63 < t

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \color{blue}{j \cdot \left(c \cdot a - y \cdot i\right)} \]
      3. fp-cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)} \]
      4. lift--.f64N/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right)} - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
      5. lift-*.f64N/A

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{b \cdot \left(c \cdot z - t \cdot i\right)}\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
      6. fp-cancel-sub-sign-invN/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) + \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right)\right)} - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
      7. associate--l+N/A

        \[\leadsto \color{blue}{x \cdot \left(y \cdot z - t \cdot a\right) + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right)} \]
      8. lift-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(y \cdot z - t \cdot a\right)} + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \color{blue}{\left(y \cdot z - t \cdot a\right) \cdot x} + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right) \]
    3. Applied rewrites77.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \mathsf{fma}\left(i \cdot t - c \cdot z, b, \left(c \cdot a - i \cdot y\right) \cdot j\right)\right)} \]
    4. Applied rewrites74.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot b, i, x \cdot \left(y \cdot z - t \cdot a\right) - \mathsf{fma}\left(i \cdot y - c \cdot a, j, \left(b \cdot c\right) \cdot z\right)\right)} \]
    5. Taylor expanded in i around inf

      \[\leadsto \color{blue}{i \cdot \left(b \cdot t - j \cdot y\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \color{blue}{\left(b \cdot t - j \cdot y\right)} \]
      2. lower--.f64N/A

        \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j \cdot y}\right) \]
      3. lower-*.f64N/A

        \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j} \cdot y\right) \]
      4. lower-*.f6438.8%

        \[\leadsto i \cdot \left(b \cdot t - j \cdot \color{blue}{y}\right) \]
    7. Applied rewrites38.8%

      \[\leadsto \color{blue}{i \cdot \left(b \cdot t - j \cdot y\right)} \]
    8. Taylor expanded in y around 0

      \[\leadsto i \cdot \left(b \cdot \color{blue}{t}\right) \]
    9. Step-by-step derivation
      1. lower-*.f6421.9%

        \[\leadsto i \cdot \left(b \cdot t\right) \]
    10. Applied rewrites21.9%

      \[\leadsto i \cdot \left(b \cdot \color{blue}{t}\right) \]

    if -2.0999999999999999e44 < t < 2.9500000000000001e-148

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
      2. lower-fma.f64N/A

        \[\leadsto y \cdot \mathsf{fma}\left(-1, \color{blue}{i \cdot j}, x \cdot z\right) \]
      3. lower-*.f64N/A

        \[\leadsto y \cdot \mathsf{fma}\left(-1, i \cdot \color{blue}{j}, x \cdot z\right) \]
      4. lower-*.f6439.0%

        \[\leadsto y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right) \]
    4. Applied rewrites39.0%

      \[\leadsto \color{blue}{y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)} \]
    5. Taylor expanded in x 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-*.f6421.8%

        \[\leadsto x \cdot \left(y \cdot z\right) \]
    7. Applied rewrites21.8%

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]

    if 2.9500000000000001e-148 < t < 8.7999999999999995e63

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Taylor expanded in a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x\right) + c \cdot j\right)} \]
      2. lower-fma.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(-1, \color{blue}{t \cdot x}, c \cdot j\right) \]
      3. lower-*.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(-1, t \cdot \color{blue}{x}, c \cdot j\right) \]
      4. lower-*.f6439.4%

        \[\leadsto a \cdot \mathsf{fma}\left(-1, t \cdot x, c \cdot j\right) \]
    4. Applied rewrites39.4%

      \[\leadsto \color{blue}{a \cdot \mathsf{fma}\left(-1, t \cdot x, c \cdot j\right)} \]
    5. Taylor expanded in x around 0

      \[\leadsto a \cdot \left(c \cdot \color{blue}{j}\right) \]
    6. Step-by-step derivation
      1. lower-*.f6422.1%

        \[\leadsto a \cdot \left(c \cdot j\right) \]
    7. Applied rewrites22.1%

      \[\leadsto a \cdot \left(c \cdot \color{blue}{j}\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 22: 28.7% accurate, 2.8× speedup?

\[\begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{+44}:\\ \;\;\;\;i \cdot \left(b \cdot t\right)\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+95}:\\ \;\;\;\;x \cdot \left(y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(i \cdot t\right)\\ \end{array} \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (if (<= t -2.1e+44)
  (* i (* b t))
  (if (<= t 2.5e+95) (* x (* y z)) (* b (* i t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (t <= -2.1e+44) {
		tmp = i * (b * t);
	} else if (t <= 2.5e+95) {
		tmp = x * (y * z);
	} else {
		tmp = b * (i * 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 (t <= (-2.1d+44)) then
        tmp = i * (b * t)
    else if (t <= 2.5d+95) then
        tmp = x * (y * z)
    else
        tmp = b * (i * 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 (t <= -2.1e+44) {
		tmp = i * (b * t);
	} else if (t <= 2.5e+95) {
		tmp = x * (y * z);
	} else {
		tmp = b * (i * t);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if t <= -2.1e+44:
		tmp = i * (b * t)
	elif t <= 2.5e+95:
		tmp = x * (y * z)
	else:
		tmp = b * (i * t)
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (t <= -2.1e+44)
		tmp = Float64(i * Float64(b * t));
	elseif (t <= 2.5e+95)
		tmp = Float64(x * Float64(y * z));
	else
		tmp = Float64(b * Float64(i * t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (t <= -2.1e+44)
		tmp = i * (b * t);
	elseif (t <= 2.5e+95)
		tmp = x * (y * z);
	else
		tmp = b * (i * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[t, -2.1e+44], N[(i * N[(b * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e+95], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+44}:\\
\;\;\;\;i \cdot \left(b \cdot t\right)\\

\mathbf{elif}\;t \leq 2.5 \cdot 10^{+95}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(i \cdot t\right)\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.0999999999999999e44

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \color{blue}{j \cdot \left(c \cdot a - y \cdot i\right)} \]
      3. fp-cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)} \]
      4. lift--.f64N/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right)} - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
      5. lift-*.f64N/A

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{b \cdot \left(c \cdot z - t \cdot i\right)}\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
      6. fp-cancel-sub-sign-invN/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) + \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right)\right)} - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
      7. associate--l+N/A

        \[\leadsto \color{blue}{x \cdot \left(y \cdot z - t \cdot a\right) + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right)} \]
      8. lift-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(y \cdot z - t \cdot a\right)} + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \color{blue}{\left(y \cdot z - t \cdot a\right) \cdot x} + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right) \]
    3. Applied rewrites77.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \mathsf{fma}\left(i \cdot t - c \cdot z, b, \left(c \cdot a - i \cdot y\right) \cdot j\right)\right)} \]
    4. Applied rewrites74.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot b, i, x \cdot \left(y \cdot z - t \cdot a\right) - \mathsf{fma}\left(i \cdot y - c \cdot a, j, \left(b \cdot c\right) \cdot z\right)\right)} \]
    5. Taylor expanded in i around inf

      \[\leadsto \color{blue}{i \cdot \left(b \cdot t - j \cdot y\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \color{blue}{\left(b \cdot t - j \cdot y\right)} \]
      2. lower--.f64N/A

        \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j \cdot y}\right) \]
      3. lower-*.f64N/A

        \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j} \cdot y\right) \]
      4. lower-*.f6438.8%

        \[\leadsto i \cdot \left(b \cdot t - j \cdot \color{blue}{y}\right) \]
    7. Applied rewrites38.8%

      \[\leadsto \color{blue}{i \cdot \left(b \cdot t - j \cdot y\right)} \]
    8. Taylor expanded in y around 0

      \[\leadsto i \cdot \left(b \cdot \color{blue}{t}\right) \]
    9. Step-by-step derivation
      1. lower-*.f6421.9%

        \[\leadsto i \cdot \left(b \cdot t\right) \]
    10. Applied rewrites21.9%

      \[\leadsto i \cdot \left(b \cdot \color{blue}{t}\right) \]

    if -2.0999999999999999e44 < t < 2.5000000000000001e95

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
      2. lower-fma.f64N/A

        \[\leadsto y \cdot \mathsf{fma}\left(-1, \color{blue}{i \cdot j}, x \cdot z\right) \]
      3. lower-*.f64N/A

        \[\leadsto y \cdot \mathsf{fma}\left(-1, i \cdot \color{blue}{j}, x \cdot z\right) \]
      4. lower-*.f6439.0%

        \[\leadsto y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right) \]
    4. Applied rewrites39.0%

      \[\leadsto \color{blue}{y \cdot \mathsf{fma}\left(-1, i \cdot j, x \cdot z\right)} \]
    5. Taylor expanded in x 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-*.f6421.8%

        \[\leadsto x \cdot \left(y \cdot z\right) \]
    7. Applied rewrites21.8%

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]

    if 2.5000000000000001e95 < t

    1. Initial program 74.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \color{blue}{j \cdot \left(c \cdot a - y \cdot i\right)} \]
      3. fp-cancel-sign-sub-invN/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)} \]
      4. lift--.f64N/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right)} - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
      5. lift-*.f64N/A

        \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{b \cdot \left(c \cdot z - t \cdot i\right)}\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
      6. fp-cancel-sub-sign-invN/A

        \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) + \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right)\right)} - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
      7. associate--l+N/A

        \[\leadsto \color{blue}{x \cdot \left(y \cdot z - t \cdot a\right) + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right)} \]
      8. lift-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(y \cdot z - t \cdot a\right)} + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \color{blue}{\left(y \cdot z - t \cdot a\right) \cdot x} + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right) \]
    3. Applied rewrites77.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \mathsf{fma}\left(i \cdot t - c \cdot z, b, \left(c \cdot a - i \cdot y\right) \cdot j\right)\right)} \]
    4. Applied rewrites74.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot b, i, x \cdot \left(y \cdot z - t \cdot a\right) - \mathsf{fma}\left(i \cdot y - c \cdot a, j, \left(b \cdot c\right) \cdot z\right)\right)} \]
    5. Taylor expanded in i around inf

      \[\leadsto \color{blue}{i \cdot \left(b \cdot t - j \cdot y\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto i \cdot \color{blue}{\left(b \cdot t - j \cdot y\right)} \]
      2. lower--.f64N/A

        \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j \cdot y}\right) \]
      3. lower-*.f64N/A

        \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j} \cdot y\right) \]
      4. lower-*.f6438.8%

        \[\leadsto i \cdot \left(b \cdot t - j \cdot \color{blue}{y}\right) \]
    7. Applied rewrites38.8%

      \[\leadsto \color{blue}{i \cdot \left(b \cdot t - j \cdot y\right)} \]
    8. Taylor expanded in y around 0

      \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot \left(i \cdot \color{blue}{t}\right) \]
      2. lower-*.f6421.6%

        \[\leadsto b \cdot \left(i \cdot t\right) \]
    10. Applied rewrites21.6%

      \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 23: 21.9% accurate, 5.9× speedup?

\[i \cdot \left(b \cdot t\right) \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (* i (* b t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return i * (b * 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 = i * (b * 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 i * (b * t);
}
def code(x, y, z, t, a, b, c, i, j):
	return i * (b * t)
function code(x, y, z, t, a, b, c, i, j)
	return Float64(i * Float64(b * t))
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = i * (b * t);
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(i * N[(b * t), $MachinePrecision]), $MachinePrecision]
i \cdot \left(b \cdot t\right)
Derivation
  1. Initial program 74.0%

    \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
  2. Step-by-step derivation
    1. lift-+.f64N/A

      \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)} \]
    2. lift-*.f64N/A

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \color{blue}{j \cdot \left(c \cdot a - y \cdot i\right)} \]
    3. fp-cancel-sign-sub-invN/A

      \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)} \]
    4. lift--.f64N/A

      \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right)} - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
    5. lift-*.f64N/A

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{b \cdot \left(c \cdot z - t \cdot i\right)}\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
    6. fp-cancel-sub-sign-invN/A

      \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) + \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right)\right)} - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
    7. associate--l+N/A

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - t \cdot a\right) + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right)} \]
    8. lift-*.f64N/A

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - t \cdot a\right)} + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \color{blue}{\left(y \cdot z - t \cdot a\right) \cdot x} + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right) \]
  3. Applied rewrites77.0%

    \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \mathsf{fma}\left(i \cdot t - c \cdot z, b, \left(c \cdot a - i \cdot y\right) \cdot j\right)\right)} \]
  4. Applied rewrites74.8%

    \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot b, i, x \cdot \left(y \cdot z - t \cdot a\right) - \mathsf{fma}\left(i \cdot y - c \cdot a, j, \left(b \cdot c\right) \cdot z\right)\right)} \]
  5. Taylor expanded in i around inf

    \[\leadsto \color{blue}{i \cdot \left(b \cdot t - j \cdot y\right)} \]
  6. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto i \cdot \color{blue}{\left(b \cdot t - j \cdot y\right)} \]
    2. lower--.f64N/A

      \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j \cdot y}\right) \]
    3. lower-*.f64N/A

      \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j} \cdot y\right) \]
    4. lower-*.f6438.8%

      \[\leadsto i \cdot \left(b \cdot t - j \cdot \color{blue}{y}\right) \]
  7. Applied rewrites38.8%

    \[\leadsto \color{blue}{i \cdot \left(b \cdot t - j \cdot y\right)} \]
  8. Taylor expanded in y around 0

    \[\leadsto i \cdot \left(b \cdot \color{blue}{t}\right) \]
  9. Step-by-step derivation
    1. lower-*.f6421.9%

      \[\leadsto i \cdot \left(b \cdot t\right) \]
  10. Applied rewrites21.9%

    \[\leadsto i \cdot \left(b \cdot \color{blue}{t}\right) \]
  11. Add Preprocessing

Alternative 24: 21.6% accurate, 5.9× speedup?

\[b \cdot \left(i \cdot t\right) \]
(FPCore (x y z t a b c i j)
  :precision binary64
  (* b (* i t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return b * (i * 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 = b * (i * 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 b * (i * t);
}
def code(x, y, z, t, a, b, c, i, j):
	return b * (i * t)
function code(x, y, z, t, a, b, c, i, j)
	return Float64(b * Float64(i * t))
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = b * (i * t);
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(b * N[(i * t), $MachinePrecision]), $MachinePrecision]
b \cdot \left(i \cdot t\right)
Derivation
  1. Initial program 74.0%

    \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
  2. Step-by-step derivation
    1. lift-+.f64N/A

      \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)} \]
    2. lift-*.f64N/A

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \color{blue}{j \cdot \left(c \cdot a - y \cdot i\right)} \]
    3. fp-cancel-sign-sub-invN/A

      \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)} \]
    4. lift--.f64N/A

      \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right)} - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
    5. lift-*.f64N/A

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{b \cdot \left(c \cdot z - t \cdot i\right)}\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
    6. fp-cancel-sub-sign-invN/A

      \[\leadsto \color{blue}{\left(x \cdot \left(y \cdot z - t \cdot a\right) + \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right)\right)} - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right) \]
    7. associate--l+N/A

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - t \cdot a\right) + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right)} \]
    8. lift-*.f64N/A

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - t \cdot a\right)} + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \color{blue}{\left(y \cdot z - t \cdot a\right) \cdot x} + \left(\left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z - t \cdot i\right) - \left(\mathsf{neg}\left(j\right)\right) \cdot \left(c \cdot a - y \cdot i\right)\right) \]
  3. Applied rewrites77.0%

    \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \mathsf{fma}\left(i \cdot t - c \cdot z, b, \left(c \cdot a - i \cdot y\right) \cdot j\right)\right)} \]
  4. Applied rewrites74.8%

    \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot b, i, x \cdot \left(y \cdot z - t \cdot a\right) - \mathsf{fma}\left(i \cdot y - c \cdot a, j, \left(b \cdot c\right) \cdot z\right)\right)} \]
  5. Taylor expanded in i around inf

    \[\leadsto \color{blue}{i \cdot \left(b \cdot t - j \cdot y\right)} \]
  6. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto i \cdot \color{blue}{\left(b \cdot t - j \cdot y\right)} \]
    2. lower--.f64N/A

      \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j \cdot y}\right) \]
    3. lower-*.f64N/A

      \[\leadsto i \cdot \left(b \cdot t - \color{blue}{j} \cdot y\right) \]
    4. lower-*.f6438.8%

      \[\leadsto i \cdot \left(b \cdot t - j \cdot \color{blue}{y}\right) \]
  7. Applied rewrites38.8%

    \[\leadsto \color{blue}{i \cdot \left(b \cdot t - j \cdot y\right)} \]
  8. Taylor expanded in y around 0

    \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} \]
  9. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto b \cdot \left(i \cdot \color{blue}{t}\right) \]
    2. lower-*.f6421.6%

      \[\leadsto b \cdot \left(i \cdot t\right) \]
  10. Applied rewrites21.6%

    \[\leadsto b \cdot \color{blue}{\left(i \cdot t\right)} \]
  11. Add Preprocessing

Reproduce

?
herbie shell --seed 2025213 
(FPCore (x y z t a b c i j)
  :name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
  :precision binary64
  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))