Linear.Matrix:det33 from linear-1.19.1.3

Percentage Accurate: 73.0% → 82.2%
Time: 16.7s
Alternatives: 24
Speedup: 0.9×

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 24 alternatives:

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

Initial Program: 73.0% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 82.2% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\left(-x\right) \cdot t, a, \mathsf{fma}\left(z \cdot x - j \cdot i, y, \mathsf{fma}\left(j \cdot t - b \cdot z, c, \left(i \cdot b\right) \cdot a\right)\right)\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)))) < 5.0000000000000004e286

    1. Initial program 93.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) \]

    if 5.0000000000000004e286 < (+.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 47.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. Applied rewrites68.0%

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

Alternative 2: 81.4% accurate, 0.5× speedup?

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

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

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


\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) \]

    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 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. +-commutativeN/A

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

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

        \[\leadsto \left(c \cdot j + \left(\mathsf{neg}\left(a\right)\right) \cdot x\right) \cdot t \]
      6. fp-cancel-sub-signN/A

        \[\leadsto \left(c \cdot j - a \cdot x\right) \cdot t \]
      7. lower--.f64N/A

        \[\leadsto \left(c \cdot j - a \cdot x\right) \cdot t \]
      8. *-commutativeN/A

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

        \[\leadsto \left(j \cdot c - a \cdot x\right) \cdot t \]
      10. lower-*.f6442.0

        \[\leadsto \left(j \cdot c - a \cdot x\right) \cdot t \]
    4. Applied rewrites42.0%

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

Alternative 3: 77.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := \left(b \cdot i - t \cdot x\right) \cdot a\\
\mathbf{if}\;a \leq -1.4 \cdot 10^{+215}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.4e215 or 3.8000000000000001e184 < a

    1. Initial program 56.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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

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

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

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

    if -1.4e215 < a < 3.8000000000000001e184

    1. Initial program 76.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. Applied rewrites78.8%

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

Alternative 4: 67.4% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -8.3999999999999996e158 or 1.15000000000000005e109 < i

    1. Initial program 60.6%

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

      \[\leadsto \color{blue}{i \cdot \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(a \cdot b\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

        \[\leadsto -1 \cdot \left(\left(j \cdot y - a \cdot b\right) \cdot \color{blue}{i}\right) \]
      6. associate-*l*N/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y - a \cdot b\right)\right) \cdot \color{blue}{i} \]
      7. distribute-lft-out--N/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(a \cdot b\right)\right) \cdot i \]
      8. lower-*.f64N/A

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

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

    if -8.3999999999999996e158 < i < 1.15000000000000005e109

    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 i around 0

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot z - t \cdot a\right) \cdot x + \left(\left(j \cdot t\right) \cdot c - \left(b \cdot z\right) \cdot \color{blue}{c}\right) \]
      8. distribute-rgt-out--N/A

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

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

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

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

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

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

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

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

Alternative 5: 58.0% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;i \leq -4.2 \cdot 10^{+33}:\\
\;\;\;\;\left(i \cdot a - c \cdot z\right) \cdot b\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if i < -1.15e172 or 1.15000000000000005e109 < i

    1. Initial program 60.2%

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

      \[\leadsto \color{blue}{i \cdot \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(a \cdot b\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

        \[\leadsto -1 \cdot \left(\left(j \cdot y - a \cdot b\right) \cdot \color{blue}{i}\right) \]
      6. associate-*l*N/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y - a \cdot b\right)\right) \cdot \color{blue}{i} \]
      7. distribute-lft-out--N/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(a \cdot b\right)\right) \cdot i \]
      8. lower-*.f64N/A

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

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

    if -1.15e172 < i < -4.2000000000000001e33

    1. Initial program 68.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. fp-cancel-sub-sign-invN/A

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(-1 \cdot \left(a \cdot i\right)\right)\right) + \left(\mathsf{neg}\left(c \cdot z\right)\right)\right) \cdot b \]
      6. distribute-neg-inN/A

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(c \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot i\right)\right)\right) \cdot b \]
      10. fp-cancel-sub-sign-invN/A

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

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

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

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

    if -4.2000000000000001e33 < i < -3.1500000000000002e-152

    1. Initial program 78.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 t around inf

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

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

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

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

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

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

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

    if -3.1500000000000002e-152 < i < 1.15000000000000005e109

    1. Initial program 79.7%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Applied rewrites72.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 57.6% accurate, 1.3× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -1.15e172 or 1.15000000000000005e109 < i

    1. Initial program 60.2%

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

      \[\leadsto \color{blue}{i \cdot \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(a \cdot b\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

        \[\leadsto -1 \cdot \left(\left(j \cdot y - a \cdot b\right) \cdot \color{blue}{i}\right) \]
      6. associate-*l*N/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y - a \cdot b\right)\right) \cdot \color{blue}{i} \]
      7. distribute-lft-out--N/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(a \cdot b\right)\right) \cdot i \]
      8. lower-*.f64N/A

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

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

    if -1.15e172 < i < -5.0000000000000002e-27

    1. Initial program 71.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 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. fp-cancel-sub-sign-invN/A

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(-1 \cdot \left(a \cdot i\right)\right)\right) + \left(\mathsf{neg}\left(c \cdot z\right)\right)\right) \cdot b \]
      6. distribute-neg-inN/A

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(c \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot i\right)\right)\right) \cdot b \]
      10. fp-cancel-sub-sign-invN/A

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

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

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

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

    if -5.0000000000000002e-27 < i < 1.15000000000000005e109

    1. Initial program 79.6%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Applied rewrites72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(j \cdot c, t, \left(z \cdot y - a \cdot t\right) \cdot x\right) \]
      16. lift-*.f6458.3

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

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

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

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

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

Alternative 7: 52.8% accurate, 1.7× speedup?

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

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

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

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

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


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

    1. Initial program 65.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. Applied rewrites71.2%

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(j \cdot c, t, \color{blue}{-1 \cdot \left(a \cdot \left(t \cdot x\right)\right)}\right) \]
    7. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(j \cdot c, t, \mathsf{neg}\left(a \cdot \left(t \cdot x\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(j \cdot c, t, \mathsf{neg}\left(\left(a \cdot t\right) \cdot x\right)\right) \]
      3. distribute-lft-neg-outN/A

        \[\leadsto \mathsf{fma}\left(j \cdot c, t, \left(\mathsf{neg}\left(a \cdot t\right)\right) \cdot \color{blue}{x}\right) \]
      4. mul-1-negN/A

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

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

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

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

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

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

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

    if -6.1999999999999998e29 < t < 2.4000000000000001e-32

    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 i around inf

      \[\leadsto \color{blue}{i \cdot \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(a \cdot b\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

        \[\leadsto -1 \cdot \left(\left(j \cdot y - a \cdot b\right) \cdot \color{blue}{i}\right) \]
      6. associate-*l*N/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y - a \cdot b\right)\right) \cdot \color{blue}{i} \]
      7. distribute-lft-out--N/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(a \cdot b\right)\right) \cdot i \]
      8. lower-*.f64N/A

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

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

    if 2.4000000000000001e-32 < t < 1.7000000000000001e35

    1. Initial program 77.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 z around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{neg}\left(c \cdot b\right)\right) \cdot z \]
      11. distribute-lft-neg-outN/A

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

        \[\leadsto \mathsf{fma}\left(y, x, \left(\mathsf{neg}\left(c\right)\right) \cdot b\right) \cdot z \]
      13. lower-neg.f6442.4

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

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

    if 1.7000000000000001e35 < t

    1. Initial program 63.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 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. +-commutativeN/A

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

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

        \[\leadsto \left(c \cdot j + \left(\mathsf{neg}\left(a\right)\right) \cdot x\right) \cdot t \]
      6. fp-cancel-sub-signN/A

        \[\leadsto \left(c \cdot j - a \cdot x\right) \cdot t \]
      7. lower--.f64N/A

        \[\leadsto \left(c \cdot j - a \cdot x\right) \cdot t \]
      8. *-commutativeN/A

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

        \[\leadsto \left(j \cdot c - a \cdot x\right) \cdot t \]
      10. lower-*.f6461.1

        \[\leadsto \left(j \cdot c - a \cdot x\right) \cdot t \]
    4. Applied rewrites61.1%

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

Alternative 8: 52.5% accurate, 1.5× speedup?

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

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

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

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

\mathbf{elif}\;t \leq -3.2 \cdot 10^{-66}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -4.7 \cdot 10^{-186}:\\
\;\;\;\;\left(z \cdot x - j \cdot i\right) \cdot y\\

\mathbf{elif}\;t \leq 4.9 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.1999999999999998e29 or 4.9e17 < t

    1. Initial program 64.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 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. +-commutativeN/A

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

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

        \[\leadsto \left(c \cdot j + \left(\mathsf{neg}\left(a\right)\right) \cdot x\right) \cdot t \]
      6. fp-cancel-sub-signN/A

        \[\leadsto \left(c \cdot j - a \cdot x\right) \cdot t \]
      7. lower--.f64N/A

        \[\leadsto \left(c \cdot j - a \cdot x\right) \cdot t \]
      8. *-commutativeN/A

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

        \[\leadsto \left(j \cdot c - a \cdot x\right) \cdot t \]
      10. lower-*.f6460.9

        \[\leadsto \left(j \cdot c - a \cdot x\right) \cdot t \]
    4. Applied rewrites60.9%

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

    if -6.1999999999999998e29 < t < -3.19999999999999982e-66 or -4.6999999999999997e-186 < t < 4.9e17

    1. Initial program 80.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 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. fp-cancel-sub-sign-invN/A

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(-1 \cdot \left(a \cdot i\right)\right)\right) + \left(\mathsf{neg}\left(c \cdot z\right)\right)\right) \cdot b \]
      6. distribute-neg-inN/A

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(c \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot i\right)\right)\right) \cdot b \]
      10. fp-cancel-sub-sign-invN/A

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

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

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

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

    if -3.19999999999999982e-66 < t < -4.6999999999999997e-186

    1. Initial program 79.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 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. +-commutativeN/A

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

        \[\leadsto \left(x \cdot z + \left(-1 \cdot i\right) \cdot j\right) \cdot y \]
      5. mul-1-negN/A

        \[\leadsto \left(x \cdot z + \left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      6. fp-cancel-sub-signN/A

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

        \[\leadsto \left(x \cdot z - i \cdot j\right) \cdot y \]
      8. *-commutativeN/A

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

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

        \[\leadsto \left(z \cdot x - j \cdot i\right) \cdot y \]
      11. lower-*.f6446.0

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

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

Alternative 9: 52.5% accurate, 1.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.1999999999999998e29 or 1.7000000000000001e35 < t

    1. Initial program 64.5%

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

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

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

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

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

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

        \[\leadsto \left(c \cdot j + \left(\mathsf{neg}\left(a\right)\right) \cdot x\right) \cdot t \]
      6. fp-cancel-sub-signN/A

        \[\leadsto \left(c \cdot j - a \cdot x\right) \cdot t \]
      7. lower--.f64N/A

        \[\leadsto \left(c \cdot j - a \cdot x\right) \cdot t \]
      8. *-commutativeN/A

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

        \[\leadsto \left(j \cdot c - a \cdot x\right) \cdot t \]
      10. lower-*.f6461.7

        \[\leadsto \left(j \cdot c - a \cdot x\right) \cdot t \]
    4. Applied rewrites61.7%

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

    if -6.1999999999999998e29 < t < 2.4000000000000001e-32

    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 i around inf

      \[\leadsto \color{blue}{i \cdot \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(a \cdot b\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

        \[\leadsto -1 \cdot \left(\left(j \cdot y - a \cdot b\right) \cdot \color{blue}{i}\right) \]
      6. associate-*l*N/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y - a \cdot b\right)\right) \cdot \color{blue}{i} \]
      7. distribute-lft-out--N/A

        \[\leadsto \left(-1 \cdot \left(j \cdot y\right) - -1 \cdot \left(a \cdot b\right)\right) \cdot i \]
      8. lower-*.f64N/A

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

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

    if 2.4000000000000001e-32 < t < 1.7000000000000001e35

    1. Initial program 77.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 z around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, x, \mathsf{neg}\left(c \cdot b\right)\right) \cdot z \]
      11. distribute-lft-neg-outN/A

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

        \[\leadsto \mathsf{fma}\left(y, x, \left(\mathsf{neg}\left(c\right)\right) \cdot b\right) \cdot z \]
      13. lower-neg.f6442.4

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

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

Alternative 10: 52.0% accurate, 2.0× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.1999999999999998e29 or 4.9e17 < t

    1. Initial program 64.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 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. +-commutativeN/A

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

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

        \[\leadsto \left(c \cdot j + \left(\mathsf{neg}\left(a\right)\right) \cdot x\right) \cdot t \]
      6. fp-cancel-sub-signN/A

        \[\leadsto \left(c \cdot j - a \cdot x\right) \cdot t \]
      7. lower--.f64N/A

        \[\leadsto \left(c \cdot j - a \cdot x\right) \cdot t \]
      8. *-commutativeN/A

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

        \[\leadsto \left(j \cdot c - a \cdot x\right) \cdot t \]
      10. lower-*.f6460.9

        \[\leadsto \left(j \cdot c - a \cdot x\right) \cdot t \]
    4. Applied rewrites60.9%

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

    if -6.1999999999999998e29 < t < 4.9e17

    1. Initial program 80.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 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. fp-cancel-sub-sign-invN/A

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(-1 \cdot \left(a \cdot i\right)\right)\right) + \left(\mathsf{neg}\left(c \cdot z\right)\right)\right) \cdot b \]
      6. distribute-neg-inN/A

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(c \cdot z + \left(\mathsf{neg}\left(a\right)\right) \cdot i\right)\right)\right) \cdot b \]
      10. fp-cancel-sub-sign-invN/A

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

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

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

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

Alternative 11: 50.9% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
t_1 := \left(c \cdot t - i \cdot y\right) \cdot j\\
\mathbf{if}\;j \leq -3.3:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -3.2999999999999998 or 9.99999999999999939e-99 < j

    1. Initial program 74.3%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in j around 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-*.f6454.5

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

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

    if -3.2999999999999998 < j < 9.99999999999999939e-99

    1. Initial program 71.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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

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

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

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

Alternative 12: 41.7% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+97}:\\
\;\;\;\;\left(-i\right) \cdot \left(y \cdot j\right)\\

\mathbf{elif}\;y \leq 4 \cdot 10^{+209}:\\
\;\;\;\;\left(b \cdot i - t \cdot x\right) \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.60000000000000008e97

    1. Initial program 61.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-*.f6446.0

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

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

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

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

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

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y\right) \]
      5. *-commutativeN/A

        \[\leadsto \left(-i\right) \cdot \left(y \cdot j\right) \]
      6. lower-*.f6438.1

        \[\leadsto \left(-i\right) \cdot \left(y \cdot j\right) \]
    7. Applied rewrites38.1%

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

    if -1.60000000000000008e97 < y < 4.0000000000000003e209

    1. Initial program 77.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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites42.5%

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

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

    if 4.0000000000000003e209 < y

    1. Initial program 58.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      3. lower-*.f6446.2

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

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

Alternative 13: 30.5% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(j \cdot t\right) \cdot c\\ \mathbf{if}\;t \leq -1.8 \cdot 10^{+260}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{+37}:\\ \;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-67}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \mathbf{elif}\;t \leq -4.7 \cdot 10^{-186}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \mathbf{elif}\;t \leq 1.16 \cdot 10^{-231}:\\ \;\;\;\;\left(b \cdot i\right) \cdot a\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+17}:\\ \;\;\;\;\left(\left(-c\right) \cdot b\right) \cdot z\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+214}:\\ \;\;\;\;\left(-t\right) \cdot \left(a \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 (* (* j t) c)))
   (if (<= t -1.8e+260)
     t_1
     (if (<= t -1.15e+37)
       (* (* (- a) t) x)
       (if (<= t -8.5e-67)
         (* (* b a) i)
         (if (<= t -4.7e-186)
           (* (* y x) z)
           (if (<= t 1.16e-231)
             (* (* b i) a)
             (if (<= t 3.5e+17)
               (* (* (- c) b) z)
               (if (<= t 5.5e+214) (* (- t) (* a 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 = (j * t) * c;
	double tmp;
	if (t <= -1.8e+260) {
		tmp = t_1;
	} else if (t <= -1.15e+37) {
		tmp = (-a * t) * x;
	} else if (t <= -8.5e-67) {
		tmp = (b * a) * i;
	} else if (t <= -4.7e-186) {
		tmp = (y * x) * z;
	} else if (t <= 1.16e-231) {
		tmp = (b * i) * a;
	} else if (t <= 3.5e+17) {
		tmp = (-c * b) * z;
	} else if (t <= 5.5e+214) {
		tmp = -t * (a * x);
	} 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 = (j * t) * c
    if (t <= (-1.8d+260)) then
        tmp = t_1
    else if (t <= (-1.15d+37)) then
        tmp = (-a * t) * x
    else if (t <= (-8.5d-67)) then
        tmp = (b * a) * i
    else if (t <= (-4.7d-186)) then
        tmp = (y * x) * z
    else if (t <= 1.16d-231) then
        tmp = (b * i) * a
    else if (t <= 3.5d+17) then
        tmp = (-c * b) * z
    else if (t <= 5.5d+214) then
        tmp = -t * (a * x)
    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 = (j * t) * c;
	double tmp;
	if (t <= -1.8e+260) {
		tmp = t_1;
	} else if (t <= -1.15e+37) {
		tmp = (-a * t) * x;
	} else if (t <= -8.5e-67) {
		tmp = (b * a) * i;
	} else if (t <= -4.7e-186) {
		tmp = (y * x) * z;
	} else if (t <= 1.16e-231) {
		tmp = (b * i) * a;
	} else if (t <= 3.5e+17) {
		tmp = (-c * b) * z;
	} else if (t <= 5.5e+214) {
		tmp = -t * (a * x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (j * t) * c
	tmp = 0
	if t <= -1.8e+260:
		tmp = t_1
	elif t <= -1.15e+37:
		tmp = (-a * t) * x
	elif t <= -8.5e-67:
		tmp = (b * a) * i
	elif t <= -4.7e-186:
		tmp = (y * x) * z
	elif t <= 1.16e-231:
		tmp = (b * i) * a
	elif t <= 3.5e+17:
		tmp = (-c * b) * z
	elif t <= 5.5e+214:
		tmp = -t * (a * x)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(j * t) * c)
	tmp = 0.0
	if (t <= -1.8e+260)
		tmp = t_1;
	elseif (t <= -1.15e+37)
		tmp = Float64(Float64(Float64(-a) * t) * x);
	elseif (t <= -8.5e-67)
		tmp = Float64(Float64(b * a) * i);
	elseif (t <= -4.7e-186)
		tmp = Float64(Float64(y * x) * z);
	elseif (t <= 1.16e-231)
		tmp = Float64(Float64(b * i) * a);
	elseif (t <= 3.5e+17)
		tmp = Float64(Float64(Float64(-c) * b) * z);
	elseif (t <= 5.5e+214)
		tmp = Float64(Float64(-t) * Float64(a * x));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (j * t) * c;
	tmp = 0.0;
	if (t <= -1.8e+260)
		tmp = t_1;
	elseif (t <= -1.15e+37)
		tmp = (-a * t) * x;
	elseif (t <= -8.5e-67)
		tmp = (b * a) * i;
	elseif (t <= -4.7e-186)
		tmp = (y * x) * z;
	elseif (t <= 1.16e-231)
		tmp = (b * i) * a;
	elseif (t <= 3.5e+17)
		tmp = (-c * b) * z;
	elseif (t <= 5.5e+214)
		tmp = -t * (a * x);
	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[(j * t), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[t, -1.8e+260], t$95$1, If[LessEqual[t, -1.15e+37], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, -8.5e-67], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[t, -4.7e-186], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 1.16e-231], N[(N[(b * i), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[t, 3.5e+17], N[(N[((-c) * b), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 5.5e+214], N[((-t) * N[(a * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(j \cdot t\right) \cdot c\\
\mathbf{if}\;t \leq -1.8 \cdot 10^{+260}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq -8.5 \cdot 10^{-67}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\

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

\mathbf{elif}\;t \leq 1.16 \cdot 10^{-231}:\\
\;\;\;\;\left(b \cdot i\right) \cdot a\\

\mathbf{elif}\;t \leq 3.5 \cdot 10^{+17}:\\
\;\;\;\;\left(\left(-c\right) \cdot b\right) \cdot z\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if t < -1.7999999999999999e260 or 5.5000000000000003e214 < t

    1. Initial program 57.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 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-*.f6450.4

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

      \[\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. lift-*.f6445.9

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

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]

    if -1.7999999999999999e260 < t < -1.15000000000000001e37

    1. Initial program 66.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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites44.6%

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

      \[\leadsto \left(-1 \cdot \left(t \cdot x\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(t \cdot x\right)\right) \cdot a \]
      2. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot t\right)\right) \cdot a \]
      3. distribute-lft-neg-outN/A

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

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

        \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
      6. lower-*.f6432.4

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

      \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
    8. Taylor expanded in x around 0

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

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      2. lower-*.f64N/A

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

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      4. lower-*.f6419.4

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites19.4%

      \[\leadsto \left(b \cdot a\right) \cdot \color{blue}{i} \]
    11. Taylor expanded in x around inf

      \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x\right)\right)} \]
    12. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(a \cdot \left(t \cdot x\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{neg}\left(\left(a \cdot t\right) \cdot x\right) \]
      3. distribute-lft-neg-outN/A

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      7. mul-1-negN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      9. lower-neg.f6434.0

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
    13. Applied rewrites34.0%

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

    if -1.15000000000000001e37 < t < -8.49999999999999993e-67

    1. Initial program 78.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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

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

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

      \[\leadsto \left(-1 \cdot \left(t \cdot x\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(t \cdot x\right)\right) \cdot a \]
      2. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot t\right)\right) \cdot a \]
      3. distribute-lft-neg-outN/A

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

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

        \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
      6. lower-*.f6417.9

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

      \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
    8. Taylor expanded in x around 0

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

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      2. lower-*.f64N/A

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

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      4. lower-*.f6424.9

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites24.9%

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

    if -8.49999999999999993e-67 < t < -4.6999999999999997e-186

    1. Initial program 79.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 z around inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      2. lift-*.f6425.5

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

      \[\leadsto \left(y \cdot x\right) \cdot z \]

    if -4.6999999999999997e-186 < t < 1.16e-231

    1. Initial program 80.9%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites30.6%

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

      \[\leadsto \left(b \cdot i\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f6427.5

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

      \[\leadsto \left(b \cdot i\right) \cdot a \]

    if 1.16e-231 < t < 3.5e17

    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 z around inf

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(-1 \cdot \left(b \cdot c\right)\right) \cdot z \]
    6. Step-by-step derivation
      1. mul-1-negN/A

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

        \[\leadsto \left(\mathsf{neg}\left(c \cdot b\right)\right) \cdot z \]
      3. distribute-lft-neg-outN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(c\right)\right) \cdot b\right) \cdot z \]
      5. lower-neg.f6425.7

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

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

    if 3.5e17 < t < 5.5000000000000003e214

    1. Initial program 67.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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites46.3%

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

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

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \left(\left(\mathsf{neg}\left(\frac{a \cdot \left(b \cdot i\right)}{t}\right)\right) + a \cdot x\right) \]
      6. associate-/l*N/A

        \[\leadsto \left(-t\right) \cdot \left(\left(\mathsf{neg}\left(a \cdot \frac{b \cdot i}{t}\right)\right) + a \cdot x\right) \]
      7. distribute-lft-neg-inN/A

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \mathsf{fma}\left(-a, \frac{b \cdot i}{t}, a \cdot x\right) \]
      12. lower-*.f6444.1

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

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

      \[\leadsto \left(-t\right) \cdot \left(a \cdot x\right) \]
    9. Step-by-step derivation
      1. lift-*.f6430.5

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

      \[\leadsto \left(-t\right) \cdot \left(a \cdot x\right) \]
  3. Recombined 7 regimes into one program.
  4. Add Preprocessing

Alternative 14: 30.4% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(j \cdot t\right) \cdot c\\ \mathbf{if}\;t \leq -1.8 \cdot 10^{+260}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{+37}:\\ \;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-67}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \mathbf{elif}\;t \leq -4.7 \cdot 10^{-186}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{-163}:\\ \;\;\;\;\left(b \cdot i\right) \cdot a\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+17}:\\ \;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+214}:\\ \;\;\;\;\left(-t\right) \cdot \left(a \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 (* (* j t) c)))
   (if (<= t -1.8e+260)
     t_1
     (if (<= t -1.15e+37)
       (* (* (- a) t) x)
       (if (<= t -8.5e-67)
         (* (* b a) i)
         (if (<= t -4.7e-186)
           (* (* y x) z)
           (if (<= t 5.5e-163)
             (* (* b i) a)
             (if (<= t 3.5e+17)
               (* (- b) (* c z))
               (if (<= t 5.5e+214) (* (- t) (* a 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 = (j * t) * c;
	double tmp;
	if (t <= -1.8e+260) {
		tmp = t_1;
	} else if (t <= -1.15e+37) {
		tmp = (-a * t) * x;
	} else if (t <= -8.5e-67) {
		tmp = (b * a) * i;
	} else if (t <= -4.7e-186) {
		tmp = (y * x) * z;
	} else if (t <= 5.5e-163) {
		tmp = (b * i) * a;
	} else if (t <= 3.5e+17) {
		tmp = -b * (c * z);
	} else if (t <= 5.5e+214) {
		tmp = -t * (a * x);
	} 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 = (j * t) * c
    if (t <= (-1.8d+260)) then
        tmp = t_1
    else if (t <= (-1.15d+37)) then
        tmp = (-a * t) * x
    else if (t <= (-8.5d-67)) then
        tmp = (b * a) * i
    else if (t <= (-4.7d-186)) then
        tmp = (y * x) * z
    else if (t <= 5.5d-163) then
        tmp = (b * i) * a
    else if (t <= 3.5d+17) then
        tmp = -b * (c * z)
    else if (t <= 5.5d+214) then
        tmp = -t * (a * x)
    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 = (j * t) * c;
	double tmp;
	if (t <= -1.8e+260) {
		tmp = t_1;
	} else if (t <= -1.15e+37) {
		tmp = (-a * t) * x;
	} else if (t <= -8.5e-67) {
		tmp = (b * a) * i;
	} else if (t <= -4.7e-186) {
		tmp = (y * x) * z;
	} else if (t <= 5.5e-163) {
		tmp = (b * i) * a;
	} else if (t <= 3.5e+17) {
		tmp = -b * (c * z);
	} else if (t <= 5.5e+214) {
		tmp = -t * (a * x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (j * t) * c
	tmp = 0
	if t <= -1.8e+260:
		tmp = t_1
	elif t <= -1.15e+37:
		tmp = (-a * t) * x
	elif t <= -8.5e-67:
		tmp = (b * a) * i
	elif t <= -4.7e-186:
		tmp = (y * x) * z
	elif t <= 5.5e-163:
		tmp = (b * i) * a
	elif t <= 3.5e+17:
		tmp = -b * (c * z)
	elif t <= 5.5e+214:
		tmp = -t * (a * x)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(j * t) * c)
	tmp = 0.0
	if (t <= -1.8e+260)
		tmp = t_1;
	elseif (t <= -1.15e+37)
		tmp = Float64(Float64(Float64(-a) * t) * x);
	elseif (t <= -8.5e-67)
		tmp = Float64(Float64(b * a) * i);
	elseif (t <= -4.7e-186)
		tmp = Float64(Float64(y * x) * z);
	elseif (t <= 5.5e-163)
		tmp = Float64(Float64(b * i) * a);
	elseif (t <= 3.5e+17)
		tmp = Float64(Float64(-b) * Float64(c * z));
	elseif (t <= 5.5e+214)
		tmp = Float64(Float64(-t) * Float64(a * x));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (j * t) * c;
	tmp = 0.0;
	if (t <= -1.8e+260)
		tmp = t_1;
	elseif (t <= -1.15e+37)
		tmp = (-a * t) * x;
	elseif (t <= -8.5e-67)
		tmp = (b * a) * i;
	elseif (t <= -4.7e-186)
		tmp = (y * x) * z;
	elseif (t <= 5.5e-163)
		tmp = (b * i) * a;
	elseif (t <= 3.5e+17)
		tmp = -b * (c * z);
	elseif (t <= 5.5e+214)
		tmp = -t * (a * x);
	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[(j * t), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[t, -1.8e+260], t$95$1, If[LessEqual[t, -1.15e+37], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, -8.5e-67], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[t, -4.7e-186], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 5.5e-163], N[(N[(b * i), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[t, 3.5e+17], N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e+214], N[((-t) * N[(a * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(j \cdot t\right) \cdot c\\
\mathbf{if}\;t \leq -1.8 \cdot 10^{+260}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq -8.5 \cdot 10^{-67}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\

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

\mathbf{elif}\;t \leq 5.5 \cdot 10^{-163}:\\
\;\;\;\;\left(b \cdot i\right) \cdot a\\

\mathbf{elif}\;t \leq 3.5 \cdot 10^{+17}:\\
\;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if t < -1.7999999999999999e260 or 5.5000000000000003e214 < t

    1. Initial program 57.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 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-*.f6450.4

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

      \[\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. lift-*.f6445.9

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

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]

    if -1.7999999999999999e260 < t < -1.15000000000000001e37

    1. Initial program 66.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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites44.6%

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

      \[\leadsto \left(-1 \cdot \left(t \cdot x\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(t \cdot x\right)\right) \cdot a \]
      2. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot t\right)\right) \cdot a \]
      3. distribute-lft-neg-outN/A

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

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

        \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
      6. lower-*.f6432.4

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

      \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
    8. Taylor expanded in x around 0

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

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      2. lower-*.f64N/A

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

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      4. lower-*.f6419.4

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites19.4%

      \[\leadsto \left(b \cdot a\right) \cdot \color{blue}{i} \]
    11. Taylor expanded in x around inf

      \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x\right)\right)} \]
    12. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(a \cdot \left(t \cdot x\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{neg}\left(\left(a \cdot t\right) \cdot x\right) \]
      3. distribute-lft-neg-outN/A

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      7. mul-1-negN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      9. lower-neg.f6434.0

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
    13. Applied rewrites34.0%

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

    if -1.15000000000000001e37 < t < -8.49999999999999993e-67

    1. Initial program 78.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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

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

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

      \[\leadsto \left(-1 \cdot \left(t \cdot x\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(t \cdot x\right)\right) \cdot a \]
      2. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot t\right)\right) \cdot a \]
      3. distribute-lft-neg-outN/A

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

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

        \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
      6. lower-*.f6417.9

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

      \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
    8. Taylor expanded in x around 0

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

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      2. lower-*.f64N/A

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

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      4. lower-*.f6424.9

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites24.9%

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

    if -8.49999999999999993e-67 < t < -4.6999999999999997e-186

    1. Initial program 79.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 z around inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      2. lift-*.f6425.5

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

      \[\leadsto \left(y \cdot x\right) \cdot z \]

    if -4.6999999999999997e-186 < t < 5.4999999999999998e-163

    1. Initial program 81.4%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites30.8%

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

      \[\leadsto \left(b \cdot i\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f6427.1

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

      \[\leadsto \left(b \cdot i\right) \cdot a \]

    if 5.4999999999999998e-163 < t < 3.5e17

    1. Initial program 79.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 c around inf

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

        \[\leadsto c \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(j \cdot t - b \cdot z\right)\right)\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto c \cdot \left(\mathsf{neg}\left(-1 \cdot \left(j \cdot t - b \cdot z\right)\right)\right) \]
      3. distribute-lft-out--N/A

        \[\leadsto c \cdot \left(\mathsf{neg}\left(\left(-1 \cdot \left(j \cdot t\right) - -1 \cdot \left(b \cdot z\right)\right)\right)\right) \]
      4. distribute-lft-out--N/A

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

        \[\leadsto c \cdot \left(\mathsf{neg}\left(\left(j \cdot t - b \cdot z\right) \cdot -1\right)\right) \]
      6. distribute-lft-neg-outN/A

        \[\leadsto c \cdot \left(\left(\mathsf{neg}\left(\left(j \cdot t - b \cdot z\right)\right)\right) \cdot \color{blue}{-1}\right) \]
      7. mul-1-negN/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(j \cdot t - b \cdot z\right)\right) \cdot -1\right) \]
      8. distribute-lft-out--N/A

        \[\leadsto c \cdot \left(\left(-1 \cdot \left(j \cdot t\right) - -1 \cdot \left(b \cdot z\right)\right) \cdot -1\right) \]
      9. associate-*l*N/A

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

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

        \[\leadsto \left(c \cdot \left(-1 \cdot \left(j \cdot t\right) - -1 \cdot \left(b \cdot z\right)\right)\right) \cdot \color{blue}{-1} \]
      12. associate-*l*N/A

        \[\leadsto c \cdot \color{blue}{\left(\left(-1 \cdot \left(j \cdot t\right) - -1 \cdot \left(b \cdot z\right)\right) \cdot -1\right)} \]
    4. Applied rewrites34.0%

      \[\leadsto \color{blue}{\left(j \cdot t - b \cdot z\right) \cdot c} \]
    5. Taylor expanded in z 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. lower-*.f6424.1

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

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

    if 3.5e17 < t < 5.5000000000000003e214

    1. Initial program 67.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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites46.3%

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

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

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \left(\left(\mathsf{neg}\left(\frac{a \cdot \left(b \cdot i\right)}{t}\right)\right) + a \cdot x\right) \]
      6. associate-/l*N/A

        \[\leadsto \left(-t\right) \cdot \left(\left(\mathsf{neg}\left(a \cdot \frac{b \cdot i}{t}\right)\right) + a \cdot x\right) \]
      7. distribute-lft-neg-inN/A

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \mathsf{fma}\left(-a, \frac{b \cdot i}{t}, a \cdot x\right) \]
      12. lower-*.f6444.1

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

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

      \[\leadsto \left(-t\right) \cdot \left(a \cdot x\right) \]
    9. Step-by-step derivation
      1. lift-*.f6430.5

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

      \[\leadsto \left(-t\right) \cdot \left(a \cdot x\right) \]
  3. Recombined 7 regimes into one program.
  4. Add Preprocessing

Alternative 15: 30.2% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(j \cdot t\right) \cdot c\\ \mathbf{if}\;t \leq -1.8 \cdot 10^{+260}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{+37}:\\ \;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-67}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \mathbf{elif}\;t \leq -4.7 \cdot 10^{-186}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{-239}:\\ \;\;\;\;\left(b \cdot i\right) \cdot a\\ \mathbf{elif}\;t \leq 0.08:\\ \;\;\;\;\left(-i\right) \cdot \left(y \cdot j\right)\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+214}:\\ \;\;\;\;\left(-t\right) \cdot \left(a \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 (* (* j t) c)))
   (if (<= t -1.8e+260)
     t_1
     (if (<= t -1.15e+37)
       (* (* (- a) t) x)
       (if (<= t -8.5e-67)
         (* (* b a) i)
         (if (<= t -4.7e-186)
           (* (* y x) z)
           (if (<= t 2.05e-239)
             (* (* b i) a)
             (if (<= t 0.08)
               (* (- i) (* y j))
               (if (<= t 5.5e+214) (* (- t) (* a 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 = (j * t) * c;
	double tmp;
	if (t <= -1.8e+260) {
		tmp = t_1;
	} else if (t <= -1.15e+37) {
		tmp = (-a * t) * x;
	} else if (t <= -8.5e-67) {
		tmp = (b * a) * i;
	} else if (t <= -4.7e-186) {
		tmp = (y * x) * z;
	} else if (t <= 2.05e-239) {
		tmp = (b * i) * a;
	} else if (t <= 0.08) {
		tmp = -i * (y * j);
	} else if (t <= 5.5e+214) {
		tmp = -t * (a * x);
	} 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 = (j * t) * c
    if (t <= (-1.8d+260)) then
        tmp = t_1
    else if (t <= (-1.15d+37)) then
        tmp = (-a * t) * x
    else if (t <= (-8.5d-67)) then
        tmp = (b * a) * i
    else if (t <= (-4.7d-186)) then
        tmp = (y * x) * z
    else if (t <= 2.05d-239) then
        tmp = (b * i) * a
    else if (t <= 0.08d0) then
        tmp = -i * (y * j)
    else if (t <= 5.5d+214) then
        tmp = -t * (a * x)
    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 = (j * t) * c;
	double tmp;
	if (t <= -1.8e+260) {
		tmp = t_1;
	} else if (t <= -1.15e+37) {
		tmp = (-a * t) * x;
	} else if (t <= -8.5e-67) {
		tmp = (b * a) * i;
	} else if (t <= -4.7e-186) {
		tmp = (y * x) * z;
	} else if (t <= 2.05e-239) {
		tmp = (b * i) * a;
	} else if (t <= 0.08) {
		tmp = -i * (y * j);
	} else if (t <= 5.5e+214) {
		tmp = -t * (a * x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (j * t) * c
	tmp = 0
	if t <= -1.8e+260:
		tmp = t_1
	elif t <= -1.15e+37:
		tmp = (-a * t) * x
	elif t <= -8.5e-67:
		tmp = (b * a) * i
	elif t <= -4.7e-186:
		tmp = (y * x) * z
	elif t <= 2.05e-239:
		tmp = (b * i) * a
	elif t <= 0.08:
		tmp = -i * (y * j)
	elif t <= 5.5e+214:
		tmp = -t * (a * x)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(j * t) * c)
	tmp = 0.0
	if (t <= -1.8e+260)
		tmp = t_1;
	elseif (t <= -1.15e+37)
		tmp = Float64(Float64(Float64(-a) * t) * x);
	elseif (t <= -8.5e-67)
		tmp = Float64(Float64(b * a) * i);
	elseif (t <= -4.7e-186)
		tmp = Float64(Float64(y * x) * z);
	elseif (t <= 2.05e-239)
		tmp = Float64(Float64(b * i) * a);
	elseif (t <= 0.08)
		tmp = Float64(Float64(-i) * Float64(y * j));
	elseif (t <= 5.5e+214)
		tmp = Float64(Float64(-t) * Float64(a * x));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (j * t) * c;
	tmp = 0.0;
	if (t <= -1.8e+260)
		tmp = t_1;
	elseif (t <= -1.15e+37)
		tmp = (-a * t) * x;
	elseif (t <= -8.5e-67)
		tmp = (b * a) * i;
	elseif (t <= -4.7e-186)
		tmp = (y * x) * z;
	elseif (t <= 2.05e-239)
		tmp = (b * i) * a;
	elseif (t <= 0.08)
		tmp = -i * (y * j);
	elseif (t <= 5.5e+214)
		tmp = -t * (a * x);
	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[(j * t), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[t, -1.8e+260], t$95$1, If[LessEqual[t, -1.15e+37], N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, -8.5e-67], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[t, -4.7e-186], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 2.05e-239], N[(N[(b * i), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[t, 0.08], N[((-i) * N[(y * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e+214], N[((-t) * N[(a * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(j \cdot t\right) \cdot c\\
\mathbf{if}\;t \leq -1.8 \cdot 10^{+260}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq -8.5 \cdot 10^{-67}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\

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

\mathbf{elif}\;t \leq 2.05 \cdot 10^{-239}:\\
\;\;\;\;\left(b \cdot i\right) \cdot a\\

\mathbf{elif}\;t \leq 0.08:\\
\;\;\;\;\left(-i\right) \cdot \left(y \cdot j\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 7 regimes
  2. if t < -1.7999999999999999e260 or 5.5000000000000003e214 < t

    1. Initial program 57.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 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-*.f6450.4

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

      \[\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. lift-*.f6445.9

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

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]

    if -1.7999999999999999e260 < t < -1.15000000000000001e37

    1. Initial program 66.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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites44.6%

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

      \[\leadsto \left(-1 \cdot \left(t \cdot x\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(t \cdot x\right)\right) \cdot a \]
      2. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot t\right)\right) \cdot a \]
      3. distribute-lft-neg-outN/A

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

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

        \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
      6. lower-*.f6432.4

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

      \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
    8. Taylor expanded in x around 0

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

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      2. lower-*.f64N/A

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

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      4. lower-*.f6419.4

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites19.4%

      \[\leadsto \left(b \cdot a\right) \cdot \color{blue}{i} \]
    11. Taylor expanded in x around inf

      \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x\right)\right)} \]
    12. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(a \cdot \left(t \cdot x\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{neg}\left(\left(a \cdot t\right) \cdot x\right) \]
      3. distribute-lft-neg-outN/A

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      7. mul-1-negN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      9. lower-neg.f6434.0

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
    13. Applied rewrites34.0%

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

    if -1.15000000000000001e37 < t < -8.49999999999999993e-67

    1. Initial program 78.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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

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

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

      \[\leadsto \left(-1 \cdot \left(t \cdot x\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(t \cdot x\right)\right) \cdot a \]
      2. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot t\right)\right) \cdot a \]
      3. distribute-lft-neg-outN/A

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

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

        \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
      6. lower-*.f6417.9

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

      \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
    8. Taylor expanded in x around 0

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

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      2. lower-*.f64N/A

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

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      4. lower-*.f6424.9

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites24.9%

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

    if -8.49999999999999993e-67 < t < -4.6999999999999997e-186

    1. Initial program 79.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 z around inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      2. lift-*.f6425.5

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

      \[\leadsto \left(y \cdot x\right) \cdot z \]

    if -4.6999999999999997e-186 < t < 2.04999999999999996e-239

    1. Initial program 80.9%

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

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites30.5%

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

      \[\leadsto \left(b \cdot i\right) \cdot a \]
    6. Step-by-step derivation
      1. lower-*.f6427.4

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

      \[\leadsto \left(b \cdot i\right) \cdot a \]

    if 2.04999999999999996e-239 < t < 0.0800000000000000017

    1. Initial program 80.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-*.f6434.1

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

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

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

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

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

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

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y\right) \]
      5. *-commutativeN/A

        \[\leadsto \left(-i\right) \cdot \left(y \cdot j\right) \]
      6. lower-*.f6426.3

        \[\leadsto \left(-i\right) \cdot \left(y \cdot j\right) \]
    7. Applied rewrites26.3%

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

    if 0.0800000000000000017 < t < 5.5000000000000003e214

    1. Initial program 68.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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \left(\left(\mathsf{neg}\left(\frac{a \cdot \left(b \cdot i\right)}{t}\right)\right) + a \cdot x\right) \]
      6. associate-/l*N/A

        \[\leadsto \left(-t\right) \cdot \left(\left(\mathsf{neg}\left(a \cdot \frac{b \cdot i}{t}\right)\right) + a \cdot x\right) \]
      7. distribute-lft-neg-inN/A

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \mathsf{fma}\left(-a, \frac{b \cdot i}{t}, a \cdot x\right) \]
      12. lower-*.f6443.7

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

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

      \[\leadsto \left(-t\right) \cdot \left(a \cdot x\right) \]
    9. Step-by-step derivation
      1. lift-*.f6429.7

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

      \[\leadsto \left(-t\right) \cdot \left(a \cdot x\right) \]
  3. Recombined 7 regimes into one program.
  4. Add Preprocessing

Alternative 16: 30.2% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b \cdot a\right) \cdot i\\ t_2 := \left(j \cdot t\right) \cdot c\\ \mathbf{if}\;t \leq -1.8 \cdot 10^{+260}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1.15 \cdot 10^{+37}:\\ \;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-67}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -4.7 \cdot 10^{-186}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+17}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+214}:\\ \;\;\;\;\left(-t\right) \cdot \left(a \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* b a) i)) (t_2 (* (* j t) c)))
   (if (<= t -1.8e+260)
     t_2
     (if (<= t -1.15e+37)
       (* (* (- a) t) x)
       (if (<= t -8.5e-67)
         t_1
         (if (<= t -4.7e-186)
           (* (* y x) z)
           (if (<= t 3.8e+17)
             t_1
             (if (<= t 5.5e+214) (* (- t) (* a x)) 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 = (b * a) * i;
	double t_2 = (j * t) * c;
	double tmp;
	if (t <= -1.8e+260) {
		tmp = t_2;
	} else if (t <= -1.15e+37) {
		tmp = (-a * t) * x;
	} else if (t <= -8.5e-67) {
		tmp = t_1;
	} else if (t <= -4.7e-186) {
		tmp = (y * x) * z;
	} else if (t <= 3.8e+17) {
		tmp = t_1;
	} else if (t <= 5.5e+214) {
		tmp = -t * (a * x);
	} else {
		tmp = t_2;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\\
\begin{array}{l}
t_1 := \left(b \cdot a\right) \cdot i\\
t_2 := \left(j \cdot t\right) \cdot c\\
\mathbf{if}\;t \leq -1.8 \cdot 10^{+260}:\\
\;\;\;\;t\_2\\

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

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

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

\mathbf{elif}\;t \leq 3.8 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.7999999999999999e260 or 5.5000000000000003e214 < t

    1. Initial program 57.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 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-*.f6450.4

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

      \[\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. lift-*.f6445.9

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

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]

    if -1.7999999999999999e260 < t < -1.15000000000000001e37

    1. Initial program 66.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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites44.6%

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

      \[\leadsto \left(-1 \cdot \left(t \cdot x\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(t \cdot x\right)\right) \cdot a \]
      2. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot t\right)\right) \cdot a \]
      3. distribute-lft-neg-outN/A

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

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

        \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
      6. lower-*.f6432.4

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

      \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
    8. Taylor expanded in x around 0

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

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      2. lower-*.f64N/A

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

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      4. lower-*.f6419.4

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites19.4%

      \[\leadsto \left(b \cdot a\right) \cdot \color{blue}{i} \]
    11. Taylor expanded in x around inf

      \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x\right)\right)} \]
    12. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{neg}\left(a \cdot \left(t \cdot x\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{neg}\left(\left(a \cdot t\right) \cdot x\right) \]
      3. distribute-lft-neg-outN/A

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

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

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

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot t\right) \cdot x \]
      7. mul-1-negN/A

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

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot t\right) \cdot x \]
      9. lower-neg.f6434.0

        \[\leadsto \left(\left(-a\right) \cdot t\right) \cdot x \]
    13. Applied rewrites34.0%

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

    if -1.15000000000000001e37 < t < -8.49999999999999993e-67 or -4.6999999999999997e-186 < t < 3.8e17

    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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites33.4%

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

      \[\leadsto \left(-1 \cdot \left(t \cdot x\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(t \cdot x\right)\right) \cdot a \]
      2. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot t\right)\right) \cdot a \]
      3. distribute-lft-neg-outN/A

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

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

        \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
      6. lower-*.f6410.9

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

      \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
    8. Taylor expanded in x around 0

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

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      2. lower-*.f64N/A

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

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      4. lower-*.f6425.4

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites25.4%

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

    if -8.49999999999999993e-67 < t < -4.6999999999999997e-186

    1. Initial program 79.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 z around inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      2. lift-*.f6425.5

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

      \[\leadsto \left(y \cdot x\right) \cdot z \]

    if 3.8e17 < t < 5.5000000000000003e214

    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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites33.4%

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

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

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \left(\left(\mathsf{neg}\left(\frac{a \cdot \left(b \cdot i\right)}{t}\right)\right) + a \cdot x\right) \]
      6. associate-/l*N/A

        \[\leadsto \left(-t\right) \cdot \left(\left(\mathsf{neg}\left(a \cdot \frac{b \cdot i}{t}\right)\right) + a \cdot x\right) \]
      7. distribute-lft-neg-inN/A

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \mathsf{fma}\left(-a, \frac{b \cdot i}{t}, a \cdot x\right) \]
      12. lower-*.f6430.1

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

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

      \[\leadsto \left(-t\right) \cdot \left(a \cdot x\right) \]
    9. Step-by-step derivation
      1. lift-*.f6411.8

        \[\leadsto \left(-t\right) \cdot \left(a \cdot x\right) \]
    10. Applied rewrites11.8%

      \[\leadsto \left(-t\right) \cdot \left(a \cdot x\right) \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 17: 30.1% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b \cdot a\right) \cdot i\\ t_2 := \left(j \cdot t\right) \cdot c\\ \mathbf{if}\;t \leq -2.1 \cdot 10^{+22}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-67}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -4.7 \cdot 10^{-186}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+17}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+214}:\\ \;\;\;\;\left(-t\right) \cdot \left(a \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* b a) i)) (t_2 (* (* j t) c)))
   (if (<= t -2.1e+22)
     t_2
     (if (<= t -8.5e-67)
       t_1
       (if (<= t -4.7e-186)
         (* (* y x) z)
         (if (<= t 3.8e+17)
           t_1
           (if (<= t 5.5e+214) (* (- t) (* a x)) 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 = (b * a) * i;
	double t_2 = (j * t) * c;
	double tmp;
	if (t <= -2.1e+22) {
		tmp = t_2;
	} else if (t <= -8.5e-67) {
		tmp = t_1;
	} else if (t <= -4.7e-186) {
		tmp = (y * x) * z;
	} else if (t <= 3.8e+17) {
		tmp = t_1;
	} else if (t <= 5.5e+214) {
		tmp = -t * (a * x);
	} else {
		tmp = t_2;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\\
\begin{array}{l}
t_1 := \left(b \cdot a\right) \cdot i\\
t_2 := \left(j \cdot t\right) \cdot c\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+22}:\\
\;\;\;\;t\_2\\

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

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

\mathbf{elif}\;t \leq 3.8 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.0999999999999998e22 or 5.5000000000000003e214 < t

    1. Initial program 63.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 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-*.f6446.2

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites46.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. lift-*.f6438.3

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

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]

    if -2.0999999999999998e22 < t < -8.49999999999999993e-67 or -4.6999999999999997e-186 < t < 3.8e17

    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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites33.5%

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

      \[\leadsto \left(-1 \cdot \left(t \cdot x\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(t \cdot x\right)\right) \cdot a \]
      2. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot t\right)\right) \cdot a \]
      3. distribute-lft-neg-outN/A

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

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

        \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
      6. lower-*.f6410.7

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

      \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
    8. Taylor expanded in x around 0

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

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      2. lower-*.f64N/A

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

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      4. lower-*.f6425.5

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

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

    if -8.49999999999999993e-67 < t < -4.6999999999999997e-186

    1. Initial program 79.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 z around inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      2. lift-*.f6425.5

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

      \[\leadsto \left(y \cdot x\right) \cdot z \]

    if 3.8e17 < t < 5.5000000000000003e214

    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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites33.5%

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

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

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \left(\left(\mathsf{neg}\left(\frac{a \cdot \left(b \cdot i\right)}{t}\right)\right) + a \cdot x\right) \]
      6. associate-/l*N/A

        \[\leadsto \left(-t\right) \cdot \left(\left(\mathsf{neg}\left(a \cdot \frac{b \cdot i}{t}\right)\right) + a \cdot x\right) \]
      7. distribute-lft-neg-inN/A

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

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

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

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

        \[\leadsto \left(-t\right) \cdot \mathsf{fma}\left(-a, \frac{b \cdot i}{t}, a \cdot x\right) \]
      12. lower-*.f6430.1

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

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

      \[\leadsto \left(-t\right) \cdot \left(a \cdot x\right) \]
    9. Step-by-step derivation
      1. lift-*.f6411.7

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

      \[\leadsto \left(-t\right) \cdot \left(a \cdot x\right) \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 18: 30.1% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_1 := \left(b \cdot a\right) \cdot i\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+22}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\

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

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

\mathbf{elif}\;t \leq 2.6 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 65.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 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 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. lift-*.f6435.6

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

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]

    if -2.0999999999999998e22 < t < -8.49999999999999993e-67 or -4.6999999999999997e-186 < t < 2.6000000000000001e83

    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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites34.6%

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

      \[\leadsto \left(-1 \cdot \left(t \cdot x\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(t \cdot x\right)\right) \cdot a \]
      2. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot t\right)\right) \cdot a \]
      3. distribute-lft-neg-outN/A

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

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

        \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
      6. lower-*.f6412.6

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

      \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
    8. Taylor expanded in x around 0

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

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      2. lower-*.f64N/A

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

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      4. lower-*.f6425.3

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites25.3%

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

    if -8.49999999999999993e-67 < t < -4.6999999999999997e-186

    1. Initial program 79.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 z around inf

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      2. lift-*.f6425.5

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

      \[\leadsto \left(y \cdot x\right) \cdot z \]

    if 2.6000000000000001e83 < t

    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 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-*.f6434.3

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

      \[\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-*.f6412.2

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

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

Alternative 19: 29.9% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_1 := \left(b \cdot a\right) \cdot i\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+22}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\

\mathbf{elif}\;t \leq -9 \cdot 10^{-67}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2.6 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 65.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 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 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. lift-*.f6435.6

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

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]

    if -2.0999999999999998e22 < t < -9.00000000000000031e-67 or -4.6999999999999997e-186 < t < 2.6000000000000001e83

    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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

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

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

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

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

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

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

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

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

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

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites34.6%

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

      \[\leadsto \left(-1 \cdot \left(t \cdot x\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(t \cdot x\right)\right) \cdot a \]
      2. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot t\right)\right) \cdot a \]
      3. distribute-lft-neg-outN/A

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

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

        \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
      6. lower-*.f6412.6

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

      \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
    8. Taylor expanded in x around 0

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

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      2. lower-*.f64N/A

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

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      4. lower-*.f6425.3

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites25.3%

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

    if -9.00000000000000031e-67 < t < -4.6999999999999997e-186

    1. Initial program 79.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 z around inf

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

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

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

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

        \[\leadsto \left(y \cdot x - b \cdot c\right) \cdot z \]
      5. lower-*.f64N/A

        \[\leadsto \left(y \cdot x - b \cdot c\right) \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
      7. lower-*.f6446.6

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
    4. Applied rewrites46.6%

      \[\leadsto \color{blue}{\left(y \cdot x - c \cdot b\right) \cdot z} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      2. lower-*.f64N/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      3. lower-*.f6426.2

        \[\leadsto \left(y \cdot z\right) \cdot x \]
    7. Applied rewrites26.2%

      \[\leadsto \left(y \cdot z\right) \cdot \color{blue}{x} \]

    if 2.6000000000000001e83 < t

    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 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-*.f6434.3

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites34.3%

      \[\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-*.f6412.2

        \[\leadsto \left(c \cdot t\right) \cdot j \]
    7. Applied rewrites12.2%

      \[\leadsto \left(c \cdot t\right) \cdot j \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 20: 29.9% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(b \cdot a\right) \cdot i\\ t_2 := \left(j \cdot t\right) \cdot c\\ \mathbf{if}\;t \leq -2.1 \cdot 10^{+22}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-67}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -4.7 \cdot 10^{-186}:\\ \;\;\;\;\left(y \cdot z\right) \cdot x\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+83}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* b a) i)) (t_2 (* (* j t) c)))
   (if (<= t -2.1e+22)
     t_2
     (if (<= t -9e-67)
       t_1
       (if (<= t -4.7e-186) (* (* y z) x) (if (<= t 2.6e+83) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (b * a) * i;
	double t_2 = (j * t) * c;
	double tmp;
	if (t <= -2.1e+22) {
		tmp = t_2;
	} else if (t <= -9e-67) {
		tmp = t_1;
	} else if (t <= -4.7e-186) {
		tmp = (y * z) * x;
	} else if (t <= 2.6e+83) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (b * a) * i
    t_2 = (j * t) * c
    if (t <= (-2.1d+22)) then
        tmp = t_2
    else if (t <= (-9d-67)) then
        tmp = t_1
    else if (t <= (-4.7d-186)) then
        tmp = (y * z) * x
    else if (t <= 2.6d+83) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (b * a) * i;
	double t_2 = (j * t) * c;
	double tmp;
	if (t <= -2.1e+22) {
		tmp = t_2;
	} else if (t <= -9e-67) {
		tmp = t_1;
	} else if (t <= -4.7e-186) {
		tmp = (y * z) * x;
	} else if (t <= 2.6e+83) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (b * a) * i
	t_2 = (j * t) * c
	tmp = 0
	if t <= -2.1e+22:
		tmp = t_2
	elif t <= -9e-67:
		tmp = t_1
	elif t <= -4.7e-186:
		tmp = (y * z) * x
	elif t <= 2.6e+83:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(b * a) * i)
	t_2 = Float64(Float64(j * t) * c)
	tmp = 0.0
	if (t <= -2.1e+22)
		tmp = t_2;
	elseif (t <= -9e-67)
		tmp = t_1;
	elseif (t <= -4.7e-186)
		tmp = Float64(Float64(y * z) * x);
	elseif (t <= 2.6e+83)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (b * a) * i;
	t_2 = (j * t) * c;
	tmp = 0.0;
	if (t <= -2.1e+22)
		tmp = t_2;
	elseif (t <= -9e-67)
		tmp = t_1;
	elseif (t <= -4.7e-186)
		tmp = (y * z) * x;
	elseif (t <= 2.6e+83)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[t, -2.1e+22], t$95$2, If[LessEqual[t, -9e-67], t$95$1, If[LessEqual[t, -4.7e-186], N[(N[(y * z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 2.6e+83], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(b \cdot a\right) \cdot i\\
t_2 := \left(j \cdot t\right) \cdot c\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+22}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -9 \cdot 10^{-67}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -4.7 \cdot 10^{-186}:\\
\;\;\;\;\left(y \cdot z\right) \cdot x\\

\mathbf{elif}\;t \leq 2.6 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.0999999999999998e22 or 2.6000000000000001e83 < t

    1. Initial program 63.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.9

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites44.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. lift-*.f6436.3

        \[\leadsto \left(j \cdot t\right) \cdot c \]
    7. Applied rewrites36.3%

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]

    if -2.0999999999999998e22 < t < -9.00000000000000031e-67 or -4.6999999999999997e-186 < t < 2.6000000000000001e83

    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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

        \[\leadsto a \cdot \left(-1 \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)}\right) \]
      2. associate-*l*N/A

        \[\leadsto \left(a \cdot -1\right) \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)} \]
      3. *-commutativeN/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
      4. associate-*r*N/A

        \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      5. associate-*r*N/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)} \]
      6. *-commutativeN/A

        \[\leadsto \left(a \cdot -1\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
      7. associate-*l*N/A

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

        \[\leadsto a \cdot \left(-1 \cdot \left(t \cdot x\right) - \color{blue}{-1 \cdot \left(b \cdot i\right)}\right) \]
      9. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
      10. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites34.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a} \]
    5. Taylor expanded in x around inf

      \[\leadsto \left(-1 \cdot \left(t \cdot x\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(t \cdot x\right)\right) \cdot a \]
      2. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot t\right)\right) \cdot a \]
      3. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(x\right)\right) \cdot t\right) \cdot a \]
      4. lift-neg.f64N/A

        \[\leadsto \left(\left(-x\right) \cdot t\right) \cdot a \]
      5. *-commutativeN/A

        \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
      6. lower-*.f6412.6

        \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
    7. Applied rewrites12.6%

      \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
    8. Taylor expanded in x around 0

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      2. lower-*.f64N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      3. *-commutativeN/A

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      4. lower-*.f6425.3

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites25.3%

      \[\leadsto \left(b \cdot a\right) \cdot \color{blue}{i} \]

    if -9.00000000000000031e-67 < t < -4.6999999999999997e-186

    1. Initial program 79.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 z around inf

      \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot \color{blue}{z} \]
      2. lower-*.f64N/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot \color{blue}{z} \]
      3. lower--.f64N/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot z \]
      4. *-commutativeN/A

        \[\leadsto \left(y \cdot x - b \cdot c\right) \cdot z \]
      5. lower-*.f64N/A

        \[\leadsto \left(y \cdot x - b \cdot c\right) \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
      7. lower-*.f6446.6

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
    4. Applied rewrites46.6%

      \[\leadsto \color{blue}{\left(y \cdot x - c \cdot b\right) \cdot z} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \color{blue}{\left(y \cdot z\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      2. lower-*.f64N/A

        \[\leadsto \left(y \cdot z\right) \cdot x \]
      3. lower-*.f6426.2

        \[\leadsto \left(y \cdot z\right) \cdot x \]
    7. Applied rewrites26.2%

      \[\leadsto \left(y \cdot z\right) \cdot \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 21: 29.9% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;j \leq -410000000:\\ \;\;\;\;\left(j \cdot c\right) \cdot t\\ \mathbf{elif}\;j \leq 3.25 \cdot 10^{-71}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= j -410000000.0)
   (* (* j c) t)
   (if (<= j 3.25e-71) (* (* b a) i) (* (* j t) c))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (j <= -410000000.0) {
		tmp = (j * c) * t;
	} else if (j <= 3.25e-71) {
		tmp = (b * a) * i;
	} else {
		tmp = (j * t) * c;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (j <= (-410000000.0d0)) then
        tmp = (j * c) * t
    else if (j <= 3.25d-71) then
        tmp = (b * a) * i
    else
        tmp = (j * t) * c
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (j <= -410000000.0) {
		tmp = (j * c) * t;
	} else if (j <= 3.25e-71) {
		tmp = (b * a) * i;
	} else {
		tmp = (j * t) * c;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if j <= -410000000.0:
		tmp = (j * c) * t
	elif j <= 3.25e-71:
		tmp = (b * a) * i
	else:
		tmp = (j * t) * c
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (j <= -410000000.0)
		tmp = Float64(Float64(j * c) * t);
	elseif (j <= 3.25e-71)
		tmp = Float64(Float64(b * a) * i);
	else
		tmp = Float64(Float64(j * t) * c);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (j <= -410000000.0)
		tmp = (j * c) * t;
	elseif (j <= 3.25e-71)
		tmp = (b * a) * i;
	else
		tmp = (j * t) * c;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -410000000.0], N[(N[(j * c), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[j, 3.25e-71], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;j \leq -410000000:\\
\;\;\;\;\left(j \cdot c\right) \cdot t\\

\mathbf{elif}\;j \leq 3.25 \cdot 10^{-71}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\

\mathbf{else}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -4.1e8

    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 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-*.f6461.5

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites61.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. lift-*.f6435.0

        \[\leadsto \left(j \cdot t\right) \cdot c \]
    7. Applied rewrites35.0%

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      2. lift-*.f64N/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      3. *-commutativeN/A

        \[\leadsto c \cdot \left(j \cdot \color{blue}{t}\right) \]
      4. associate-*r*N/A

        \[\leadsto \left(c \cdot j\right) \cdot t \]
      5. lower-*.f64N/A

        \[\leadsto \left(c \cdot j\right) \cdot t \]
      6. *-commutativeN/A

        \[\leadsto \left(j \cdot c\right) \cdot t \]
      7. lower-*.f6435.4

        \[\leadsto \left(j \cdot c\right) \cdot t \]
    9. Applied rewrites35.4%

      \[\leadsto \left(j \cdot c\right) \cdot t \]

    if -4.1e8 < j < 3.25000000000000003e-71

    1. Initial program 71.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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

        \[\leadsto a \cdot \left(-1 \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)}\right) \]
      2. associate-*l*N/A

        \[\leadsto \left(a \cdot -1\right) \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)} \]
      3. *-commutativeN/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
      4. associate-*r*N/A

        \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      5. associate-*r*N/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)} \]
      6. *-commutativeN/A

        \[\leadsto \left(a \cdot -1\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
      7. associate-*l*N/A

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

        \[\leadsto a \cdot \left(-1 \cdot \left(t \cdot x\right) - \color{blue}{-1 \cdot \left(b \cdot i\right)}\right) \]
      9. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
      10. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites46.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a} \]
    5. Taylor expanded in x around inf

      \[\leadsto \left(-1 \cdot \left(t \cdot x\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(t \cdot x\right)\right) \cdot a \]
      2. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot t\right)\right) \cdot a \]
      3. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(x\right)\right) \cdot t\right) \cdot a \]
      4. lift-neg.f64N/A

        \[\leadsto \left(\left(-x\right) \cdot t\right) \cdot a \]
      5. *-commutativeN/A

        \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
      6. lower-*.f6424.7

        \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
    7. Applied rewrites24.7%

      \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
    8. Taylor expanded in x around 0

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      2. lower-*.f64N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      3. *-commutativeN/A

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      4. lower-*.f6427.4

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites27.4%

      \[\leadsto \left(b \cdot a\right) \cdot \color{blue}{i} \]

    if 3.25000000000000003e-71 < j

    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 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-*.f6451.5

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites51.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. lift-*.f6429.4

        \[\leadsto \left(j \cdot t\right) \cdot c \]
    7. Applied rewrites29.4%

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 22: 29.9% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(j \cdot c\right) \cdot t\\ \mathbf{if}\;j \leq -410000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq 3.25 \cdot 10^{-71}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* j c) t)))
   (if (<= j -410000000.0) t_1 (if (<= j 3.25e-71) (* (* b a) i) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (j * c) * t;
	double tmp;
	if (j <= -410000000.0) {
		tmp = t_1;
	} else if (j <= 3.25e-71) {
		tmp = (b * a) * i;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (j * c) * t
    if (j <= (-410000000.0d0)) then
        tmp = t_1
    else if (j <= 3.25d-71) then
        tmp = (b * a) * i
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (j * c) * t;
	double tmp;
	if (j <= -410000000.0) {
		tmp = t_1;
	} else if (j <= 3.25e-71) {
		tmp = (b * a) * i;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (j * c) * t
	tmp = 0
	if j <= -410000000.0:
		tmp = t_1
	elif j <= 3.25e-71:
		tmp = (b * a) * i
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(j * c) * t)
	tmp = 0.0
	if (j <= -410000000.0)
		tmp = t_1;
	elseif (j <= 3.25e-71)
		tmp = Float64(Float64(b * a) * i);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (j * c) * t;
	tmp = 0.0;
	if (j <= -410000000.0)
		tmp = t_1;
	elseif (j <= 3.25e-71)
		tmp = (b * a) * i;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(j * c), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[j, -410000000.0], t$95$1, If[LessEqual[j, 3.25e-71], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(j \cdot c\right) \cdot t\\
\mathbf{if}\;j \leq -410000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq 3.25 \cdot 10^{-71}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -4.1e8 or 3.25000000000000003e-71 < j

    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 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-*.f6455.8

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites55.8%

      \[\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. lift-*.f6431.8

        \[\leadsto \left(j \cdot t\right) \cdot c \]
    7. Applied rewrites31.8%

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      2. lift-*.f64N/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      3. *-commutativeN/A

        \[\leadsto c \cdot \left(j \cdot \color{blue}{t}\right) \]
      4. associate-*r*N/A

        \[\leadsto \left(c \cdot j\right) \cdot t \]
      5. lower-*.f64N/A

        \[\leadsto \left(c \cdot j\right) \cdot t \]
      6. *-commutativeN/A

        \[\leadsto \left(j \cdot c\right) \cdot t \]
      7. lower-*.f6432.3

        \[\leadsto \left(j \cdot c\right) \cdot t \]
    9. Applied rewrites32.3%

      \[\leadsto \left(j \cdot c\right) \cdot t \]

    if -4.1e8 < j < 3.25000000000000003e-71

    1. Initial program 71.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 a around inf

      \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. distribute-lft-out--N/A

        \[\leadsto a \cdot \left(-1 \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)}\right) \]
      2. associate-*l*N/A

        \[\leadsto \left(a \cdot -1\right) \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)} \]
      3. *-commutativeN/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
      4. associate-*r*N/A

        \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      5. associate-*r*N/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)} \]
      6. *-commutativeN/A

        \[\leadsto \left(a \cdot -1\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
      7. associate-*l*N/A

        \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
      8. distribute-lft-out--N/A

        \[\leadsto a \cdot \left(-1 \cdot \left(t \cdot x\right) - \color{blue}{-1 \cdot \left(b \cdot i\right)}\right) \]
      9. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
      10. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    4. Applied rewrites46.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a} \]
    5. Taylor expanded in x around inf

      \[\leadsto \left(-1 \cdot \left(t \cdot x\right)\right) \cdot a \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(t \cdot x\right)\right) \cdot a \]
      2. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(x \cdot t\right)\right) \cdot a \]
      3. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(x\right)\right) \cdot t\right) \cdot a \]
      4. lift-neg.f64N/A

        \[\leadsto \left(\left(-x\right) \cdot t\right) \cdot a \]
      5. *-commutativeN/A

        \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
      6. lower-*.f6424.7

        \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
    7. Applied rewrites24.7%

      \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
    8. Taylor expanded in x around 0

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      2. lower-*.f64N/A

        \[\leadsto \left(a \cdot b\right) \cdot i \]
      3. *-commutativeN/A

        \[\leadsto \left(b \cdot a\right) \cdot i \]
      4. lower-*.f6427.4

        \[\leadsto \left(b \cdot a\right) \cdot i \]
    10. Applied rewrites27.4%

      \[\leadsto \left(b \cdot a\right) \cdot \color{blue}{i} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 23: 22.7% accurate, 5.9× speedup?

\[\begin{array}{l} \\ \left(b \cdot a\right) \cdot i \end{array} \]
(FPCore (x y z t a b c i j) :precision binary64 (* (* b a) i))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return (b * a) * i;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    code = (b * a) * i
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return (b * a) * i;
}
def code(x, y, z, t, a, b, c, i, j):
	return (b * a) * i
function code(x, y, z, t, a, b, c, i, j)
	return Float64(Float64(b * a) * i)
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = (b * a) * i;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision]
\begin{array}{l}

\\
\left(b \cdot a\right) \cdot i
\end{array}
Derivation
  1. Initial program 73.0%

    \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
  2. Taylor expanded in a around inf

    \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
  3. Step-by-step derivation
    1. distribute-lft-out--N/A

      \[\leadsto a \cdot \left(-1 \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)}\right) \]
    2. associate-*l*N/A

      \[\leadsto \left(a \cdot -1\right) \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)} \]
    3. *-commutativeN/A

      \[\leadsto \left(-1 \cdot a\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
    4. associate-*r*N/A

      \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
    5. associate-*r*N/A

      \[\leadsto \left(-1 \cdot a\right) \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)} \]
    6. *-commutativeN/A

      \[\leadsto \left(a \cdot -1\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
    7. associate-*l*N/A

      \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
    8. distribute-lft-out--N/A

      \[\leadsto a \cdot \left(-1 \cdot \left(t \cdot x\right) - \color{blue}{-1 \cdot \left(b \cdot i\right)}\right) \]
    9. *-commutativeN/A

      \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    10. lower-*.f64N/A

      \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
  4. Applied rewrites39.6%

    \[\leadsto \color{blue}{\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a} \]
  5. Taylor expanded in x around inf

    \[\leadsto \left(-1 \cdot \left(t \cdot x\right)\right) \cdot a \]
  6. Step-by-step derivation
    1. mul-1-negN/A

      \[\leadsto \left(\mathsf{neg}\left(t \cdot x\right)\right) \cdot a \]
    2. *-commutativeN/A

      \[\leadsto \left(\mathsf{neg}\left(x \cdot t\right)\right) \cdot a \]
    3. distribute-lft-neg-outN/A

      \[\leadsto \left(\left(\mathsf{neg}\left(x\right)\right) \cdot t\right) \cdot a \]
    4. lift-neg.f64N/A

      \[\leadsto \left(\left(-x\right) \cdot t\right) \cdot a \]
    5. *-commutativeN/A

      \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
    6. lower-*.f6422.0

      \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
  7. Applied rewrites22.0%

    \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
  8. Taylor expanded in x around 0

    \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
  9. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \left(a \cdot b\right) \cdot i \]
    2. lower-*.f64N/A

      \[\leadsto \left(a \cdot b\right) \cdot i \]
    3. *-commutativeN/A

      \[\leadsto \left(b \cdot a\right) \cdot i \]
    4. lower-*.f6422.7

      \[\leadsto \left(b \cdot a\right) \cdot i \]
  10. Applied rewrites22.7%

    \[\leadsto \left(b \cdot a\right) \cdot \color{blue}{i} \]
  11. Add Preprocessing

Alternative 24: 22.2% accurate, 5.9× speedup?

\[\begin{array}{l} \\ b \cdot \left(i \cdot a\right) \end{array} \]
(FPCore (x y z t a b c i j) :precision binary64 (* b (* i a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return b * (i * a);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    code = b * (i * a)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return b * (i * a);
}
def code(x, y, z, t, a, b, c, i, j):
	return b * (i * a)
function code(x, y, z, t, a, b, c, i, j)
	return Float64(b * Float64(i * a))
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = b * (i * a);
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(b * N[(i * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
b \cdot \left(i \cdot a\right)
\end{array}
Derivation
  1. Initial program 73.0%

    \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
  2. Taylor expanded in a around inf

    \[\leadsto \color{blue}{a \cdot \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right)} \]
  3. Step-by-step derivation
    1. distribute-lft-out--N/A

      \[\leadsto a \cdot \left(-1 \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)}\right) \]
    2. associate-*l*N/A

      \[\leadsto \left(a \cdot -1\right) \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)} \]
    3. *-commutativeN/A

      \[\leadsto \left(-1 \cdot a\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
    4. associate-*r*N/A

      \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
    5. associate-*r*N/A

      \[\leadsto \left(-1 \cdot a\right) \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)} \]
    6. *-commutativeN/A

      \[\leadsto \left(a \cdot -1\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
    7. associate-*l*N/A

      \[\leadsto a \cdot \color{blue}{\left(-1 \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
    8. distribute-lft-out--N/A

      \[\leadsto a \cdot \left(-1 \cdot \left(t \cdot x\right) - \color{blue}{-1 \cdot \left(b \cdot i\right)}\right) \]
    9. *-commutativeN/A

      \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
    10. lower-*.f64N/A

      \[\leadsto \left(-1 \cdot \left(t \cdot x\right) - -1 \cdot \left(b \cdot i\right)\right) \cdot \color{blue}{a} \]
  4. Applied rewrites39.6%

    \[\leadsto \color{blue}{\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a} \]
  5. Taylor expanded in x around inf

    \[\leadsto \left(-1 \cdot \left(t \cdot x\right)\right) \cdot a \]
  6. Step-by-step derivation
    1. mul-1-negN/A

      \[\leadsto \left(\mathsf{neg}\left(t \cdot x\right)\right) \cdot a \]
    2. *-commutativeN/A

      \[\leadsto \left(\mathsf{neg}\left(x \cdot t\right)\right) \cdot a \]
    3. distribute-lft-neg-outN/A

      \[\leadsto \left(\left(\mathsf{neg}\left(x\right)\right) \cdot t\right) \cdot a \]
    4. lift-neg.f64N/A

      \[\leadsto \left(\left(-x\right) \cdot t\right) \cdot a \]
    5. *-commutativeN/A

      \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
    6. lower-*.f6422.0

      \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
  7. Applied rewrites22.0%

    \[\leadsto \left(t \cdot \left(-x\right)\right) \cdot a \]
  8. Taylor expanded in x around 0

    \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
  9. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \left(a \cdot b\right) \cdot i \]
    2. lower-*.f64N/A

      \[\leadsto \left(a \cdot b\right) \cdot i \]
    3. *-commutativeN/A

      \[\leadsto \left(b \cdot a\right) \cdot i \]
    4. lower-*.f6422.7

      \[\leadsto \left(b \cdot a\right) \cdot i \]
  10. Applied rewrites22.7%

    \[\leadsto \left(b \cdot a\right) \cdot \color{blue}{i} \]
  11. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto \left(b \cdot a\right) \cdot i \]
    2. lift-*.f64N/A

      \[\leadsto \left(b \cdot a\right) \cdot i \]
    3. associate-*l*N/A

      \[\leadsto b \cdot \left(a \cdot \color{blue}{i}\right) \]
    4. lower-*.f64N/A

      \[\leadsto b \cdot \left(a \cdot \color{blue}{i}\right) \]
    5. *-commutativeN/A

      \[\leadsto b \cdot \left(i \cdot a\right) \]
    6. lift-*.f6422.2

      \[\leadsto b \cdot \left(i \cdot a\right) \]
  12. Applied rewrites22.2%

    \[\leadsto b \cdot \left(i \cdot \color{blue}{a}\right) \]
  13. Add Preprocessing

Reproduce

?
herbie shell --seed 2025130 
(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)))))