Linear.Matrix:det33 from linear-1.19.1.3

Percentage Accurate: 74.0% → 82.3%
Time: 8.2s
Alternatives: 21
Speedup: 0.5×

Specification

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

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 alternatives:

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

Initial Program: 74.0% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 82.3% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(i \cdot a - c \cdot z, b, \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(c \cdot t - 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 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y))))

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lift-*.f6426.0

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
    4. Applied rewrites26.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 70.3% accurate, 1.1× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -7.20000000000000063e131

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(i \cdot a - c \cdot z, b, \left(-i\right) \cdot \left(j \cdot y\right)\right) \]
      5. lift-*.f6472.2

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

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

    if -7.20000000000000063e131 < b < -1.88e-34

    1. Initial program 74.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lift-*.f6461.6

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
    4. Applied rewrites61.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.88e-34 < b < 4.4999999999999998e72

    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.4999999999999998e72 < b

    1. Initial program 75.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lift-*.f6469.5

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
    4. Applied rewrites69.5%

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      9. lift--.f64N/A

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

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

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

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

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

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

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

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

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

Alternative 3: 69.9% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -6.20000000000000021e-32 or 4.4999999999999998e72 < b

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lift-*.f6467.8

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
    4. Applied rewrites67.8%

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      9. lift--.f64N/A

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

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

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

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

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

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

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

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

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

    if -6.20000000000000021e-32 < b < 4.4999999999999998e72

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 69.8% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3e21

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3e21 < b < 5.5999999999999998e72

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.5999999999999998e72 < b

    1. Initial program 75.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lift-*.f6469.5

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
    4. Applied rewrites69.5%

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

Alternative 5: 69.4% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -3e21

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3e21 < b < 3.3999999999999999e74

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.3999999999999999e74 < b

    1. Initial program 75.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(i \cdot a - c \cdot z, b, \left(-a\right) \cdot \left(t \cdot x\right)\right) \]
      5. lower-*.f6471.5

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

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

Alternative 6: 60.0% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;b \leq -3 \cdot 10^{-46}:\\
\;\;\;\;t\_2\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.55000000000000007e62

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(i \cdot a - c \cdot z, b, \left(-i\right) \cdot \left(j \cdot y\right)\right) \]
      5. lift-*.f6469.9

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

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

    if -1.55000000000000007e62 < b < -2.99999999999999987e-46 or 6.6000000000000003e97 < b

    1. Initial program 75.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.99999999999999987e-46 < b < 3.6999999999999997e-272

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lift-*.f6448.5

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
    4. Applied rewrites48.5%

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

      \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z\right) \cdot b \]
    6. Step-by-step derivation
      1. lift-*.f6445.5

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z\right) \cdot b \]
    7. Applied rewrites45.5%

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

    if 3.6999999999999997e-272 < b < 6.6000000000000003e97

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

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

Alternative 7: 59.8% accurate, 1.2× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.6999999999999999e28 or 3.2999999999999999e38 < t

    1. Initial program 65.1%

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

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

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

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

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

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

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

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

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

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

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

    if -3.6999999999999999e28 < t < 4.50000000000000016e-84

    1. Initial program 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.50000000000000016e-84 < t < 3.2999999999999999e38

    1. Initial program 77.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 57.4% accurate, 1.5× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.6999999999999999e28 or 3.2999999999999999e38 < t

    1. Initial program 65.1%

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

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

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

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

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

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

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

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

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

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

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

    if -3.6999999999999999e28 < t < 3.2999999999999999e38

    1. Initial program 80.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 53.2% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
t_1 := i \cdot a - c \cdot z\\
\mathbf{if}\;b \leq -2.05 \cdot 10^{+21}:\\
\;\;\;\;t\_1 \cdot b\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -2.05e21

    1. Initial program 72.6%

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

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

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

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

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

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

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      6. lift-*.f6460.9

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
    4. Applied rewrites60.9%

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

    if -2.05e21 < b < 3.6999999999999997e-272

    1. Initial program 73.3%

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      8. lower-*.f6443.8

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
    4. Applied rewrites43.8%

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

    if 3.6999999999999997e-272 < b < 2.49999999999999982e74

    1. Initial program 74.9%

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

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

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

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6444.2

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites44.2%

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

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

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

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

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

        \[\leadsto \left(\left(-t\right) \cdot \left(-1 \cdot c + \frac{i \cdot y}{t}\right)\right) \cdot j \]
      5. +-commutativeN/A

        \[\leadsto \left(\left(-t\right) \cdot \left(\frac{i \cdot y}{t} + -1 \cdot c\right)\right) \cdot j \]
      6. associate-/l*N/A

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

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

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

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

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

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

    if 2.49999999999999982e74 < b

    1. Initial program 75.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(i \cdot a - c \cdot z, b, \left(j \cdot t\right) \cdot c\right) \]
      3. lower-*.f6471.7

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

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

Alternative 10: 53.0% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
t_1 := \left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -2.05 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.05e21 or 2.49999999999999982e74 < b

    1. Initial program 73.8%

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

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

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

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

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

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

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      6. lift-*.f6463.5

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
    4. Applied rewrites63.5%

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

    if -2.05e21 < b < 3.6999999999999997e-272

    1. Initial program 73.3%

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      8. lower-*.f6443.8

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
    4. Applied rewrites43.8%

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

    if 3.6999999999999997e-272 < b < 2.49999999999999982e74

    1. Initial program 74.9%

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

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

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

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6444.2

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites44.2%

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

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

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

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

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

        \[\leadsto \left(\left(-t\right) \cdot \left(-1 \cdot c + \frac{i \cdot y}{t}\right)\right) \cdot j \]
      5. +-commutativeN/A

        \[\leadsto \left(\left(-t\right) \cdot \left(\frac{i \cdot y}{t} + -1 \cdot c\right)\right) \cdot j \]
      6. associate-/l*N/A

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

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

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

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

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

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

Alternative 11: 52.3% accurate, 1.7× speedup?

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

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((i * a) - (c * z)) * b
    if (b <= (-2.05d+21)) then
        tmp = t_1
    else if (b <= 3.7d-272) then
        tmp = ((z * y) - (a * t)) * x
    else if (b <= 4.5d+72) then
        tmp = ((c * t) - (i * y)) * j
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((i * a) - (c * z)) * b;
	double tmp;
	if (b <= -2.05e+21) {
		tmp = t_1;
	} else if (b <= 3.7e-272) {
		tmp = ((z * y) - (a * t)) * x;
	} else if (b <= 4.5e+72) {
		tmp = ((c * t) - (i * y)) * j;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = ((i * a) - (c * z)) * b
	tmp = 0
	if b <= -2.05e+21:
		tmp = t_1
	elif b <= 3.7e-272:
		tmp = ((z * y) - (a * t)) * x
	elif b <= 4.5e+72:
		tmp = ((c * t) - (i * y)) * j
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(Float64(i * a) - Float64(c * z)) * b)
	tmp = 0.0
	if (b <= -2.05e+21)
		tmp = t_1;
	elseif (b <= 3.7e-272)
		tmp = Float64(Float64(Float64(z * y) - Float64(a * t)) * x);
	elseif (b <= 4.5e+72)
		tmp = Float64(Float64(Float64(c * t) - Float64(i * y)) * j);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = ((i * a) - (c * z)) * b;
	tmp = 0.0;
	if (b <= -2.05e+21)
		tmp = t_1;
	elseif (b <= 3.7e-272)
		tmp = ((z * y) - (a * t)) * x;
	elseif (b <= 4.5e+72)
		tmp = ((c * t) - (i * y)) * j;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -2.05e+21], t$95$1, If[LessEqual[b, 3.7e-272], N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[b, 4.5e+72], N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -2.05 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.05e21 or 4.4999999999999998e72 < b

    1. Initial program 73.8%

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

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

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

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

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

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

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      6. lift-*.f6463.4

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
    4. Applied rewrites63.4%

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

    if -2.05e21 < b < 3.6999999999999997e-272

    1. Initial program 73.3%

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      8. lower-*.f6443.8

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
    4. Applied rewrites43.8%

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

    if 3.6999999999999997e-272 < b < 4.4999999999999998e72

    1. Initial program 74.9%

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

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

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

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6444.2

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites44.2%

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

Alternative 12: 52.2% accurate, 2.0× speedup?

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

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

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

\\
\begin{array}{l}
t_1 := \left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -2.9 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.9e19 or 4.4999999999999998e72 < b

    1. Initial program 73.7%

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

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

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

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

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

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

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      6. lift-*.f6463.3

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
    4. Applied rewrites63.3%

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

    if -2.9e19 < b < 4.4999999999999998e72

    1. Initial program 74.1%

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

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

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

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6445.1

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites45.1%

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

Alternative 13: 41.7% accurate, 2.0× speedup?

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

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

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

\\
\begin{array}{l}
t_1 := \left(-b\right) \cdot \left(c \cdot z\right)\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.9 \cdot 10^{+17}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.15e65 or 2.9e17 < z

    1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lift-*.f6464.2

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
    4. Applied rewrites64.2%

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

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

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

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

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

        \[\leadsto \left(-b\right) \cdot \left(c \cdot z\right) \]
      5. lift-*.f6437.1

        \[\leadsto \left(-b\right) \cdot \left(c \cdot z\right) \]
    7. Applied rewrites37.1%

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

    if -1.15e65 < z < 2.9e17

    1. Initial program 80.2%

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

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

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

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6445.2

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites45.2%

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

Alternative 14: 31.0% accurate, 1.8× speedup?

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

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = -b * (c * z)
    if (z <= (-1d+65)) then
        tmp = t_1
    else if (z <= (-6d-61)) then
        tmp = (c * t) * j
    else if (z <= 3.4d-157) then
        tmp = -a * (t * x)
    else if (z <= 4.6d+36) then
        tmp = (i * b) * a
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = -b * (c * z);
	double tmp;
	if (z <= -1e+65) {
		tmp = t_1;
	} else if (z <= -6e-61) {
		tmp = (c * t) * j;
	} else if (z <= 3.4e-157) {
		tmp = -a * (t * x);
	} else if (z <= 4.6e+36) {
		tmp = (i * b) * a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = -b * (c * z)
	tmp = 0
	if z <= -1e+65:
		tmp = t_1
	elif z <= -6e-61:
		tmp = (c * t) * j
	elif z <= 3.4e-157:
		tmp = -a * (t * x)
	elif z <= 4.6e+36:
		tmp = (i * b) * a
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(-b) * Float64(c * z))
	tmp = 0.0
	if (z <= -1e+65)
		tmp = t_1;
	elseif (z <= -6e-61)
		tmp = Float64(Float64(c * t) * j);
	elseif (z <= 3.4e-157)
		tmp = Float64(Float64(-a) * Float64(t * x));
	elseif (z <= 4.6e+36)
		tmp = Float64(Float64(i * b) * a);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = -b * (c * z);
	tmp = 0.0;
	if (z <= -1e+65)
		tmp = t_1;
	elseif (z <= -6e-61)
		tmp = (c * t) * j;
	elseif (z <= 3.4e-157)
		tmp = -a * (t * x);
	elseif (z <= 4.6e+36)
		tmp = (i * b) * a;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+65], t$95$1, If[LessEqual[z, -6e-61], N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[z, 3.4e-157], N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e+36], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(-b\right) \cdot \left(c \cdot z\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -6 \cdot 10^{-61}:\\
\;\;\;\;\left(c \cdot t\right) \cdot j\\

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

\mathbf{elif}\;z \leq 4.6 \cdot 10^{+36}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -9.9999999999999999e64 or 4.59999999999999993e36 < z

    1. Initial program 65.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lift-*.f6464.2

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
    4. Applied rewrites64.2%

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

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

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

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

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

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

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

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

    if -9.9999999999999999e64 < z < -6.00000000000000024e-61

    1. Initial program 77.7%

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

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

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

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6440.6

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

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

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

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

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

    if -6.00000000000000024e-61 < z < 3.39999999999999977e-157

    1. Initial program 81.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lift-*.f6452.6

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
    4. Applied rewrites52.6%

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

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

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

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

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

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) \]
      5. lower-*.f6426.2

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

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

    if 3.39999999999999977e-157 < z < 4.59999999999999993e36

    1. Initial program 79.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lift-*.f6457.4

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

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

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

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lower-*.f6425.1

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

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

Alternative 15: 30.5% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{if}\;t \leq -1.05 \cdot 10^{+42}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{-83}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;t \leq 3200000000:\\ \;\;\;\;\left(i \cdot b\right) \cdot a\\ \mathbf{elif}\;t \leq 2.5 \cdot 10^{+175}:\\ \;\;\;\;\left(c \cdot t\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (- a) (* t x))))
   (if (<= t -1.05e+42)
     t_1
     (if (<= t 1.55e-83)
       (* (* z y) x)
       (if (<= t 3200000000.0)
         (* (* i b) a)
         (if (<= t 2.5e+175) (* (* c t) 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 = -a * (t * x);
	double tmp;
	if (t <= -1.05e+42) {
		tmp = t_1;
	} else if (t <= 1.55e-83) {
		tmp = (z * y) * x;
	} else if (t <= 3200000000.0) {
		tmp = (i * b) * a;
	} else if (t <= 2.5e+175) {
		tmp = (c * t) * 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 = -a * (t * x)
    if (t <= (-1.05d+42)) then
        tmp = t_1
    else if (t <= 1.55d-83) then
        tmp = (z * y) * x
    else if (t <= 3200000000.0d0) then
        tmp = (i * b) * a
    else if (t <= 2.5d+175) then
        tmp = (c * t) * 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 = -a * (t * x);
	double tmp;
	if (t <= -1.05e+42) {
		tmp = t_1;
	} else if (t <= 1.55e-83) {
		tmp = (z * y) * x;
	} else if (t <= 3200000000.0) {
		tmp = (i * b) * a;
	} else if (t <= 2.5e+175) {
		tmp = (c * t) * j;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = -a * (t * x)
	tmp = 0
	if t <= -1.05e+42:
		tmp = t_1
	elif t <= 1.55e-83:
		tmp = (z * y) * x
	elif t <= 3200000000.0:
		tmp = (i * b) * a
	elif t <= 2.5e+175:
		tmp = (c * t) * j
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(-a) * Float64(t * x))
	tmp = 0.0
	if (t <= -1.05e+42)
		tmp = t_1;
	elseif (t <= 1.55e-83)
		tmp = Float64(Float64(z * y) * x);
	elseif (t <= 3200000000.0)
		tmp = Float64(Float64(i * b) * a);
	elseif (t <= 2.5e+175)
		tmp = Float64(Float64(c * t) * j);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = -a * (t * x);
	tmp = 0.0;
	if (t <= -1.05e+42)
		tmp = t_1;
	elseif (t <= 1.55e-83)
		tmp = (z * y) * x;
	elseif (t <= 3200000000.0)
		tmp = (i * b) * a;
	elseif (t <= 2.5e+175)
		tmp = (c * t) * 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[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e+42], t$95$1, If[LessEqual[t, 1.55e-83], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 3200000000.0], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[t, 2.5e+175], N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq 3200000000:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\

\mathbf{elif}\;t \leq 2.5 \cdot 10^{+175}:\\
\;\;\;\;\left(c \cdot t\right) \cdot j\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.04999999999999998e42 or 2.5e175 < t

    1. Initial program 63.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lift-*.f6453.4

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
    4. Applied rewrites53.4%

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

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

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

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

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

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) \]
      5. lower-*.f6438.4

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

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

    if -1.04999999999999998e42 < t < 1.54999999999999996e-83

    1. Initial program 81.2%

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      8. lower-*.f6431.5

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
    4. Applied rewrites31.5%

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

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

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

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

      \[\leadsto \left(z \cdot y\right) \cdot x \]

    if 1.54999999999999996e-83 < t < 3.2e9

    1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lift-*.f6458.9

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

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

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

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lower-*.f6424.8

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

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

    if 3.2e9 < t < 2.5e175

    1. Initial program 71.8%

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

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

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

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

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

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6443.7

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites43.7%

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

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

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

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

Alternative 16: 30.4% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(c \cdot t\right) \cdot j\\ \mathbf{if}\;t \leq -4 \cdot 10^{+56}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{-83}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;t \leq 3200000000:\\ \;\;\;\;\left(i \cdot b\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* c t) j)))
   (if (<= t -4e+56)
     t_1
     (if (<= t 1.55e-83)
       (* (* z y) x)
       (if (<= t 3200000000.0) (* (* i b) a) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (c * t) * j;
	double tmp;
	if (t <= -4e+56) {
		tmp = t_1;
	} else if (t <= 1.55e-83) {
		tmp = (z * y) * x;
	} else if (t <= 3200000000.0) {
		tmp = (i * b) * a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (c * t) * j
    if (t <= (-4d+56)) then
        tmp = t_1
    else if (t <= 1.55d-83) then
        tmp = (z * y) * x
    else if (t <= 3200000000.0d0) then
        tmp = (i * b) * a
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (c * t) * j;
	double tmp;
	if (t <= -4e+56) {
		tmp = t_1;
	} else if (t <= 1.55e-83) {
		tmp = (z * y) * x;
	} else if (t <= 3200000000.0) {
		tmp = (i * b) * a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (c * t) * j
	tmp = 0
	if t <= -4e+56:
		tmp = t_1
	elif t <= 1.55e-83:
		tmp = (z * y) * x
	elif t <= 3200000000.0:
		tmp = (i * b) * a
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(c * t) * j)
	tmp = 0.0
	if (t <= -4e+56)
		tmp = t_1;
	elseif (t <= 1.55e-83)
		tmp = Float64(Float64(z * y) * x);
	elseif (t <= 3200000000.0)
		tmp = Float64(Float64(i * b) * a);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (c * t) * j;
	tmp = 0.0;
	if (t <= -4e+56)
		tmp = t_1;
	elseif (t <= 1.55e-83)
		tmp = (z * y) * x;
	elseif (t <= 3200000000.0)
		tmp = (i * b) * a;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[t, -4e+56], t$95$1, If[LessEqual[t, 1.55e-83], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 3200000000.0], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(c \cdot t\right) \cdot j\\
\mathbf{if}\;t \leq -4 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.55 \cdot 10^{-83}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\

\mathbf{elif}\;t \leq 3200000000:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.00000000000000037e56 or 3.2e9 < t

    1. Initial program 65.5%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
      2. lower-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
      3. lift--.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6445.9

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites45.9%

      \[\leadsto \color{blue}{\left(c \cdot t - i \cdot y\right) \cdot j} \]
    5. Taylor expanded in y around 0

      \[\leadsto \left(c \cdot t\right) \cdot j \]
    6. Step-by-step derivation
      1. lift-*.f6435.5

        \[\leadsto \left(c \cdot t\right) \cdot j \]
    7. Applied rewrites35.5%

      \[\leadsto \left(c \cdot t\right) \cdot j \]

    if -4.00000000000000037e56 < t < 1.54999999999999996e-83

    1. Initial program 81.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot \color{blue}{x} \]
      2. *-commutativeN/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x \]
      3. lower-*.f64N/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot \color{blue}{x} \]
      4. lift--.f64N/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x \]
      5. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x \]
      6. *-commutativeN/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      7. lower-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
      8. lower-*.f6431.5

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x \]
    4. Applied rewrites31.5%

      \[\leadsto \color{blue}{\left(z \cdot y - a \cdot t\right) \cdot x} \]
    5. Taylor expanded in y around inf

      \[\leadsto \left(y \cdot z\right) \cdot x \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      2. lift-*.f6425.2

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    7. Applied rewrites25.2%

      \[\leadsto \left(z \cdot y\right) \cdot x \]

    if 1.54999999999999996e-83 < t < 3.2e9

    1. Initial program 75.7%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in j around 0

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    3. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto x \cdot \left(y \cdot z - a \cdot t\right) - \color{blue}{b \cdot \left(c \cdot z - a \cdot i\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x - \color{blue}{b} \cdot \left(c \cdot z - a \cdot i\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x - \color{blue}{b} \cdot \left(c \cdot z - a \cdot i\right) \]
      5. lift--.f64N/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      6. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      9. lower-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      10. *-commutativeN/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - a \cdot i\right) \cdot \color{blue}{b} \]
      11. *-commutativeN/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      12. lower-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot \color{blue}{b} \]
      13. lift--.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      14. lift-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lift-*.f6458.9

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
    4. Applied rewrites58.9%

      \[\leadsto \color{blue}{\left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b} \]
    5. Taylor expanded in i around inf

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lower-*.f6424.8

        \[\leadsto \left(i \cdot b\right) \cdot a \]
    7. Applied rewrites24.8%

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 17: 30.4% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{-27}:\\ \;\;\;\;\left(i \cdot b\right) \cdot a\\ \mathbf{elif}\;b \leq 7.5 \cdot 10^{-180}:\\ \;\;\;\;\left(x \cdot z\right) \cdot y\\ \mathbf{elif}\;b \leq 1.36 \cdot 10^{+66}:\\ \;\;\;\;\left(c \cdot t\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= b -5.2e-27)
   (* (* i b) a)
   (if (<= b 7.5e-180)
     (* (* x z) y)
     (if (<= b 1.36e+66) (* (* c t) j) (* (* b a) i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (b <= -5.2e-27) {
		tmp = (i * b) * a;
	} else if (b <= 7.5e-180) {
		tmp = (x * z) * y;
	} else if (b <= 1.36e+66) {
		tmp = (c * t) * j;
	} else {
		tmp = (b * a) * i;
	}
	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 (b <= (-5.2d-27)) then
        tmp = (i * b) * a
    else if (b <= 7.5d-180) then
        tmp = (x * z) * y
    else if (b <= 1.36d+66) then
        tmp = (c * t) * j
    else
        tmp = (b * a) * i
    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 (b <= -5.2e-27) {
		tmp = (i * b) * a;
	} else if (b <= 7.5e-180) {
		tmp = (x * z) * y;
	} else if (b <= 1.36e+66) {
		tmp = (c * t) * j;
	} else {
		tmp = (b * a) * i;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if b <= -5.2e-27:
		tmp = (i * b) * a
	elif b <= 7.5e-180:
		tmp = (x * z) * y
	elif b <= 1.36e+66:
		tmp = (c * t) * j
	else:
		tmp = (b * a) * i
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (b <= -5.2e-27)
		tmp = Float64(Float64(i * b) * a);
	elseif (b <= 7.5e-180)
		tmp = Float64(Float64(x * z) * y);
	elseif (b <= 1.36e+66)
		tmp = Float64(Float64(c * t) * j);
	else
		tmp = Float64(Float64(b * a) * i);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (b <= -5.2e-27)
		tmp = (i * b) * a;
	elseif (b <= 7.5e-180)
		tmp = (x * z) * y;
	elseif (b <= 1.36e+66)
		tmp = (c * t) * j;
	else
		tmp = (b * a) * i;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -5.2e-27], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 7.5e-180], N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[b, 1.36e+66], N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.2 \cdot 10^{-27}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\

\mathbf{elif}\;b \leq 7.5 \cdot 10^{-180}:\\
\;\;\;\;\left(x \cdot z\right) \cdot y\\

\mathbf{elif}\;b \leq 1.36 \cdot 10^{+66}:\\
\;\;\;\;\left(c \cdot t\right) \cdot j\\

\mathbf{else}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -5.20000000000000034e-27

    1. Initial program 73.6%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in j around 0

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    3. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto x \cdot \left(y \cdot z - a \cdot t\right) - \color{blue}{b \cdot \left(c \cdot z - a \cdot i\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x - \color{blue}{b} \cdot \left(c \cdot z - a \cdot i\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x - \color{blue}{b} \cdot \left(c \cdot z - a \cdot i\right) \]
      5. lift--.f64N/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      6. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      9. lower-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      10. *-commutativeN/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - a \cdot i\right) \cdot \color{blue}{b} \]
      11. *-commutativeN/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      12. lower-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot \color{blue}{b} \]
      13. lift--.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      14. lift-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lift-*.f6466.7

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
    4. Applied rewrites66.7%

      \[\leadsto \color{blue}{\left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b} \]
    5. Taylor expanded in i around inf

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lower-*.f6434.6

        \[\leadsto \left(i \cdot b\right) \cdot a \]
    7. Applied rewrites34.6%

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]

    if -5.20000000000000034e-27 < b < 7.50000000000000015e-180

    1. Initial program 71.9%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6446.8

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites46.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    5. Taylor expanded in x around inf

      \[\leadsto \left(x \cdot z\right) \cdot y \]
    6. Step-by-step derivation
      1. lower-*.f6425.1

        \[\leadsto \left(x \cdot z\right) \cdot y \]
    7. Applied rewrites25.1%

      \[\leadsto \left(x \cdot z\right) \cdot y \]

    if 7.50000000000000015e-180 < b < 1.36e66

    1. Initial program 76.8%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
      2. lower-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
      3. lift--.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6443.2

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites43.2%

      \[\leadsto \color{blue}{\left(c \cdot t - i \cdot y\right) \cdot j} \]
    5. Taylor expanded in y around 0

      \[\leadsto \left(c \cdot t\right) \cdot j \]
    6. Step-by-step derivation
      1. lift-*.f6424.3

        \[\leadsto \left(c \cdot t\right) \cdot j \]
    7. Applied rewrites24.3%

      \[\leadsto \left(c \cdot t\right) \cdot j \]

    if 1.36e66 < b

    1. Initial program 75.1%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in b around 0

      \[\leadsto \color{blue}{b \cdot \left(a \cdot i - c \cdot z\right) + \left(j \cdot \left(c \cdot t - i \cdot y\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot b + \left(\color{blue}{j \cdot \left(c \cdot t - i \cdot y\right)} + x \cdot \left(y \cdot z - a \cdot t\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(a \cdot i - c \cdot z, \color{blue}{b}, j \cdot \left(c \cdot t - i \cdot y\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(a \cdot i - c \cdot z, b, j \cdot \left(c \cdot t - i \cdot y\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(i \cdot a - c \cdot z, b, j \cdot \left(c \cdot t - i \cdot y\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) \]
      5. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i \cdot a - c \cdot z, b, j \cdot \left(c \cdot t - i \cdot y\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) \]
      6. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i \cdot a - c \cdot z, b, j \cdot \left(c \cdot t - i \cdot y\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(i \cdot a - c \cdot z, b, x \cdot \left(y \cdot z - a \cdot t\right) + j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(i \cdot a - c \cdot z, b, \left(y \cdot z - a \cdot t\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(i \cdot a - c \cdot z, b, \left(y \cdot z - t \cdot a\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      10. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i \cdot a - c \cdot z, b, \mathsf{fma}\left(y \cdot z - t \cdot a, x, j \cdot \left(c \cdot t - i \cdot y\right)\right)\right) \]
    4. Applied rewrites80.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i \cdot a - c \cdot z, b, \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(c \cdot t - i \cdot y\right) \cdot j\right)\right)} \]
    5. Taylor expanded in i around inf

      \[\leadsto \color{blue}{i \cdot \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(a \cdot b\right)\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(a \cdot b\right)\right) \cdot \color{blue}{i} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(a \cdot b\right)\right) \cdot \color{blue}{i} \]
      3. associate-*r*N/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - \left(-1 \cdot a\right) \cdot b\right) \cdot i \]
      4. mul-1-negN/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot b\right) \cdot i \]
      5. fp-cancel-sign-sub-invN/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) + a \cdot b\right) \cdot i \]
      6. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot j\right) \cdot y + a \cdot b\right) \cdot i \]
      7. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(j\right)\right) \cdot y + a \cdot b\right) \cdot i \]
      8. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(j\right), y, a \cdot b\right) \cdot i \]
      9. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-j, y, a \cdot b\right) \cdot i \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-j, y, b \cdot a\right) \cdot i \]
      11. lift-*.f6449.7

        \[\leadsto \mathsf{fma}\left(-j, y, b \cdot a\right) \cdot i \]
    7. Applied rewrites49.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-j, y, b \cdot a\right) \cdot i} \]
    8. Taylor expanded in y around 0

      \[\leadsto \left(a \cdot b\right) \cdot i \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      2. lift-*.f6439.4

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites39.4%

      \[\leadsto \left(b \cdot a\right) \cdot i \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 18: 30.2% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{-27}:\\ \;\;\;\;\left(i \cdot b\right) \cdot a\\ \mathbf{elif}\;b \leq 7.5 \cdot 10^{-180}:\\ \;\;\;\;\left(x \cdot z\right) \cdot y\\ \mathbf{elif}\;b \leq 3.3 \cdot 10^{+65}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= b -5.2e-27)
   (* (* i b) a)
   (if (<= b 7.5e-180)
     (* (* x z) y)
     (if (<= b 3.3e+65) (* (* j t) c) (* (* b a) i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (b <= -5.2e-27) {
		tmp = (i * b) * a;
	} else if (b <= 7.5e-180) {
		tmp = (x * z) * y;
	} else if (b <= 3.3e+65) {
		tmp = (j * t) * c;
	} else {
		tmp = (b * a) * i;
	}
	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 (b <= (-5.2d-27)) then
        tmp = (i * b) * a
    else if (b <= 7.5d-180) then
        tmp = (x * z) * y
    else if (b <= 3.3d+65) then
        tmp = (j * t) * c
    else
        tmp = (b * a) * i
    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 (b <= -5.2e-27) {
		tmp = (i * b) * a;
	} else if (b <= 7.5e-180) {
		tmp = (x * z) * y;
	} else if (b <= 3.3e+65) {
		tmp = (j * t) * c;
	} else {
		tmp = (b * a) * i;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if b <= -5.2e-27:
		tmp = (i * b) * a
	elif b <= 7.5e-180:
		tmp = (x * z) * y
	elif b <= 3.3e+65:
		tmp = (j * t) * c
	else:
		tmp = (b * a) * i
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (b <= -5.2e-27)
		tmp = Float64(Float64(i * b) * a);
	elseif (b <= 7.5e-180)
		tmp = Float64(Float64(x * z) * y);
	elseif (b <= 3.3e+65)
		tmp = Float64(Float64(j * t) * c);
	else
		tmp = Float64(Float64(b * a) * i);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (b <= -5.2e-27)
		tmp = (i * b) * a;
	elseif (b <= 7.5e-180)
		tmp = (x * z) * y;
	elseif (b <= 3.3e+65)
		tmp = (j * t) * c;
	else
		tmp = (b * a) * i;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -5.2e-27], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 7.5e-180], N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[b, 3.3e+65], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.2 \cdot 10^{-27}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\

\mathbf{elif}\;b \leq 7.5 \cdot 10^{-180}:\\
\;\;\;\;\left(x \cdot z\right) \cdot y\\

\mathbf{elif}\;b \leq 3.3 \cdot 10^{+65}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\

\mathbf{else}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -5.20000000000000034e-27

    1. Initial program 73.6%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in j around 0

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    3. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto x \cdot \left(y \cdot z - a \cdot t\right) - \color{blue}{b \cdot \left(c \cdot z - a \cdot i\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x - \color{blue}{b} \cdot \left(c \cdot z - a \cdot i\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x - \color{blue}{b} \cdot \left(c \cdot z - a \cdot i\right) \]
      5. lift--.f64N/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      6. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      9. lower-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      10. *-commutativeN/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - a \cdot i\right) \cdot \color{blue}{b} \]
      11. *-commutativeN/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      12. lower-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot \color{blue}{b} \]
      13. lift--.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      14. lift-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lift-*.f6466.7

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
    4. Applied rewrites66.7%

      \[\leadsto \color{blue}{\left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b} \]
    5. Taylor expanded in i around inf

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lower-*.f6434.6

        \[\leadsto \left(i \cdot b\right) \cdot a \]
    7. Applied rewrites34.6%

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]

    if -5.20000000000000034e-27 < b < 7.50000000000000015e-180

    1. Initial program 71.9%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6446.8

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites46.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    5. Taylor expanded in x around inf

      \[\leadsto \left(x \cdot z\right) \cdot y \]
    6. Step-by-step derivation
      1. lower-*.f6425.1

        \[\leadsto \left(x \cdot z\right) \cdot y \]
    7. Applied rewrites25.1%

      \[\leadsto \left(x \cdot z\right) \cdot y \]

    if 7.50000000000000015e-180 < b < 3.30000000000000023e65

    1. Initial program 76.8%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
      2. lower-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
      3. lift--.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6443.2

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites43.2%

      \[\leadsto \color{blue}{\left(c \cdot t - i \cdot y\right) \cdot j} \]
    5. Taylor expanded in y around 0

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      2. lower-*.f64N/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      3. lower-*.f6424.7

        \[\leadsto \left(j \cdot t\right) \cdot c \]
    7. Applied rewrites24.7%

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]

    if 3.30000000000000023e65 < b

    1. Initial program 75.1%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in b around 0

      \[\leadsto \color{blue}{b \cdot \left(a \cdot i - c \cdot z\right) + \left(j \cdot \left(c \cdot t - i \cdot y\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot b + \left(\color{blue}{j \cdot \left(c \cdot t - i \cdot y\right)} + x \cdot \left(y \cdot z - a \cdot t\right)\right) \]
      2. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(a \cdot i - c \cdot z, \color{blue}{b}, j \cdot \left(c \cdot t - i \cdot y\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) \]
      3. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(a \cdot i - c \cdot z, b, j \cdot \left(c \cdot t - i \cdot y\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(i \cdot a - c \cdot z, b, j \cdot \left(c \cdot t - i \cdot y\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) \]
      5. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i \cdot a - c \cdot z, b, j \cdot \left(c \cdot t - i \cdot y\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) \]
      6. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(i \cdot a - c \cdot z, b, j \cdot \left(c \cdot t - i \cdot y\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(i \cdot a - c \cdot z, b, x \cdot \left(y \cdot z - a \cdot t\right) + j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(i \cdot a - c \cdot z, b, \left(y \cdot z - a \cdot t\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(i \cdot a - c \cdot z, b, \left(y \cdot z - t \cdot a\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right)\right) \]
      10. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(i \cdot a - c \cdot z, b, \mathsf{fma}\left(y \cdot z - t \cdot a, x, j \cdot \left(c \cdot t - i \cdot y\right)\right)\right) \]
    4. Applied rewrites80.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(i \cdot a - c \cdot z, b, \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(c \cdot t - i \cdot y\right) \cdot j\right)\right)} \]
    5. Taylor expanded in i around inf

      \[\leadsto \color{blue}{i \cdot \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(a \cdot b\right)\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(a \cdot b\right)\right) \cdot \color{blue}{i} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(a \cdot b\right)\right) \cdot \color{blue}{i} \]
      3. associate-*r*N/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - \left(-1 \cdot a\right) \cdot b\right) \cdot i \]
      4. mul-1-negN/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - \left(\mathsf{neg}\left(a\right)\right) \cdot b\right) \cdot i \]
      5. fp-cancel-sign-sub-invN/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) + a \cdot b\right) \cdot i \]
      6. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot j\right) \cdot y + a \cdot b\right) \cdot i \]
      7. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(j\right)\right) \cdot y + a \cdot b\right) \cdot i \]
      8. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(j\right), y, a \cdot b\right) \cdot i \]
      9. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-j, y, a \cdot b\right) \cdot i \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-j, y, b \cdot a\right) \cdot i \]
      11. lift-*.f6449.8

        \[\leadsto \mathsf{fma}\left(-j, y, b \cdot a\right) \cdot i \]
    7. Applied rewrites49.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-j, y, b \cdot a\right) \cdot i} \]
    8. Taylor expanded in y around 0

      \[\leadsto \left(a \cdot b\right) \cdot i \]
    9. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      2. lift-*.f6439.4

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites39.4%

      \[\leadsto \left(b \cdot a\right) \cdot i \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 19: 29.7% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot z\right) \cdot y\\ \mathbf{if}\;z \leq -1.06 \cdot 10^{+61}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3.3 \cdot 10^{-60}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+81}:\\ \;\;\;\;\left(i \cdot b\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* x z) y)))
   (if (<= z -1.06e+61)
     t_1
     (if (<= z -3.3e-60)
       (* (* j t) c)
       (if (<= z 1.35e+81) (* (* i b) a) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (x * z) * y;
	double tmp;
	if (z <= -1.06e+61) {
		tmp = t_1;
	} else if (z <= -3.3e-60) {
		tmp = (j * t) * c;
	} else if (z <= 1.35e+81) {
		tmp = (i * b) * a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x * z) * y
    if (z <= (-1.06d+61)) then
        tmp = t_1
    else if (z <= (-3.3d-60)) then
        tmp = (j * t) * c
    else if (z <= 1.35d+81) then
        tmp = (i * b) * a
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (x * z) * y;
	double tmp;
	if (z <= -1.06e+61) {
		tmp = t_1;
	} else if (z <= -3.3e-60) {
		tmp = (j * t) * c;
	} else if (z <= 1.35e+81) {
		tmp = (i * b) * a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (x * z) * y
	tmp = 0
	if z <= -1.06e+61:
		tmp = t_1
	elif z <= -3.3e-60:
		tmp = (j * t) * c
	elif z <= 1.35e+81:
		tmp = (i * b) * a
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(x * z) * y)
	tmp = 0.0
	if (z <= -1.06e+61)
		tmp = t_1;
	elseif (z <= -3.3e-60)
		tmp = Float64(Float64(j * t) * c);
	elseif (z <= 1.35e+81)
		tmp = Float64(Float64(i * b) * a);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (x * z) * y;
	tmp = 0.0;
	if (z <= -1.06e+61)
		tmp = t_1;
	elseif (z <= -3.3e-60)
		tmp = (j * t) * c;
	elseif (z <= 1.35e+81)
		tmp = (i * b) * a;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -1.06e+61], t$95$1, If[LessEqual[z, -3.3e-60], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[z, 1.35e+81], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(x \cdot z\right) \cdot y\\
\mathbf{if}\;z \leq -1.06 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -3.3 \cdot 10^{-60}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\

\mathbf{elif}\;z \leq 1.35 \cdot 10^{+81}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.0599999999999999e61 or 1.35e81 < z

    1. Initial program 64.4%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6447.7

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites47.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    5. Taylor expanded in x around inf

      \[\leadsto \left(x \cdot z\right) \cdot y \]
    6. Step-by-step derivation
      1. lower-*.f6437.5

        \[\leadsto \left(x \cdot z\right) \cdot y \]
    7. Applied rewrites37.5%

      \[\leadsto \left(x \cdot z\right) \cdot y \]

    if -1.0599999999999999e61 < z < -3.2999999999999998e-60

    1. Initial program 77.9%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
      2. lower-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
      3. lift--.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6440.5

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites40.5%

      \[\leadsto \color{blue}{\left(c \cdot t - i \cdot y\right) \cdot j} \]
    5. Taylor expanded in y around 0

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      2. lower-*.f64N/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      3. lower-*.f6421.9

        \[\leadsto \left(j \cdot t\right) \cdot c \]
    7. Applied rewrites21.9%

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]

    if -3.2999999999999998e-60 < z < 1.35e81

    1. Initial program 80.4%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in j around 0

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    3. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto x \cdot \left(y \cdot z - a \cdot t\right) - \color{blue}{b \cdot \left(c \cdot z - a \cdot i\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x - \color{blue}{b} \cdot \left(c \cdot z - a \cdot i\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x - \color{blue}{b} \cdot \left(c \cdot z - a \cdot i\right) \]
      5. lift--.f64N/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      6. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      9. lower-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      10. *-commutativeN/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - a \cdot i\right) \cdot \color{blue}{b} \]
      11. *-commutativeN/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      12. lower-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot \color{blue}{b} \]
      13. lift--.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      14. lift-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lift-*.f6454.9

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
    4. Applied rewrites54.9%

      \[\leadsto \color{blue}{\left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b} \]
    5. Taylor expanded in i around inf

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lower-*.f6426.3

        \[\leadsto \left(i \cdot b\right) \cdot a \]
    7. Applied rewrites26.3%

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 20: 29.6% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(i \cdot b\right) \cdot a\\ \mathbf{if}\;b \leq -3 \cdot 10^{-28}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq 3.3 \cdot 10^{+65}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* i b) a)))
   (if (<= b -3e-28) t_1 (if (<= b 3.3e+65) (* (* j t) 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 = (i * b) * a;
	double tmp;
	if (b <= -3e-28) {
		tmp = t_1;
	} else if (b <= 3.3e+65) {
		tmp = (j * t) * c;
	} 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) * a
    if (b <= (-3d-28)) then
        tmp = t_1
    else if (b <= 3.3d+65) then
        tmp = (j * t) * c
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (i * b) * a;
	double tmp;
	if (b <= -3e-28) {
		tmp = t_1;
	} else if (b <= 3.3e+65) {
		tmp = (j * t) * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (i * b) * a
	tmp = 0
	if b <= -3e-28:
		tmp = t_1
	elif b <= 3.3e+65:
		tmp = (j * t) * c
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(i * b) * a)
	tmp = 0.0
	if (b <= -3e-28)
		tmp = t_1;
	elseif (b <= 3.3e+65)
		tmp = Float64(Float64(j * t) * c);
	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) * a;
	tmp = 0.0;
	if (b <= -3e-28)
		tmp = t_1;
	elseif (b <= 3.3e+65)
		tmp = (j * t) * c;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[b, -3e-28], t$95$1, If[LessEqual[b, 3.3e+65], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(i \cdot b\right) \cdot a\\
\mathbf{if}\;b \leq -3 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 3.3 \cdot 10^{+65}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -3.00000000000000003e-28 or 3.30000000000000023e65 < b

    1. Initial program 74.2%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in j around 0

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z - a \cdot t\right) - b \cdot \left(c \cdot z - a \cdot i\right)} \]
    3. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto x \cdot \left(y \cdot z - a \cdot t\right) - \color{blue}{b \cdot \left(c \cdot z - a \cdot i\right)} \]
      2. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x - \color{blue}{b} \cdot \left(c \cdot z - a \cdot i\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      4. lower-*.f64N/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x - \color{blue}{b} \cdot \left(c \cdot z - a \cdot i\right) \]
      5. lift--.f64N/A

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      6. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      9. lower-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - b \cdot \left(c \cdot z - a \cdot i\right) \]
      10. *-commutativeN/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - a \cdot i\right) \cdot \color{blue}{b} \]
      11. *-commutativeN/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      12. lower-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot \color{blue}{b} \]
      13. lift--.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      14. lift-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
      15. lift-*.f6467.7

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b \]
    4. Applied rewrites67.7%

      \[\leadsto \color{blue}{\left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot z - i \cdot a\right) \cdot b} \]
    5. Taylor expanded in i around inf

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lower-*.f6437.0

        \[\leadsto \left(i \cdot b\right) \cdot a \]
    7. Applied rewrites37.0%

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]

    if -3.00000000000000003e-28 < b < 3.30000000000000023e65

    1. Initial program 73.7%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
      2. lower-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
      3. lift--.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6445.7

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites45.7%

      \[\leadsto \color{blue}{\left(c \cdot t - i \cdot y\right) \cdot j} \]
    5. Taylor expanded in y around 0

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      2. lower-*.f64N/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      3. lower-*.f6425.6

        \[\leadsto \left(j \cdot t\right) \cdot c \]
    7. Applied rewrites25.6%

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 21: 21.7% accurate, 5.9× speedup?

\[\begin{array}{l} \\ \left(j \cdot t\right) \cdot c \end{array} \]
(FPCore (x y z t a b c i j) :precision binary64 (* (* j t) c))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return (j * t) * c;
}
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 = (j * t) * c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return (j * t) * c;
}
def code(x, y, z, t, a, b, c, i, j):
	return (j * t) * c
function code(x, y, z, t, a, b, c, i, j)
	return Float64(Float64(j * t) * c)
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = (j * t) * c;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision]
\begin{array}{l}

\\
\left(j \cdot t\right) \cdot c
\end{array}
Derivation
  1. Initial program 74.0%

    \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
  2. Taylor expanded in j around inf

    \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right)} \]
  3. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
    2. lower-*.f64N/A

      \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
    3. lift--.f64N/A

      \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. lift-*.f64N/A

      \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    5. lift-*.f6439.9

      \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
  4. Applied rewrites39.9%

    \[\leadsto \color{blue}{\left(c \cdot t - i \cdot y\right) \cdot j} \]
  5. Taylor expanded in y around 0

    \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
  6. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \left(j \cdot t\right) \cdot c \]
    2. lower-*.f64N/A

      \[\leadsto \left(j \cdot t\right) \cdot c \]
    3. lower-*.f6421.7

      \[\leadsto \left(j \cdot t\right) \cdot c \]
  7. Applied rewrites21.7%

    \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]
  8. Add Preprocessing

Reproduce

?
herbie shell --seed 2025120 
(FPCore (x y z t a b c i j)
  :name "Linear.Matrix:det33 from linear-1.19.1.3"
  :precision binary64
  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))