Linear.Matrix:det33 from linear-1.19.1.3

Percentage Accurate: 74.1% → 82.4%
Time: 7.6s
Alternatives: 26
Speedup: 0.5×

Specification

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

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 26 alternatives:

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

Initial Program: 74.1% 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.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}:\\ \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \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 (* (fma (- i) j (* z x)) y))))
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 = fma(-i, j, (z * x)) * y;
	}
	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(fma(Float64(-i), j, Float64(z * x)) * y);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $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}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\


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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 72.2% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;y \leq 8.6 \cdot 10^{-75}:\\
\;\;\;\;t\_2 - \left(c \cdot z - i \cdot a\right) \cdot b\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.20000000000000006e110

    1. Initial program 63.4%

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

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

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

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

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

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

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

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

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

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

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

    if -1.20000000000000006e110 < y < 4.00000000000000009e-287

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
      17. lower-*.f6461.6

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

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

    if 4.00000000000000009e-287 < y < 8.5999999999999998e-75

    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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.5999999999999998e-75 < y < 4.4000000000000003e147

    1. Initial program 77.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 c around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.4000000000000003e147 < y

    1. Initial program 60.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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-i\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lift-neg.f64N/A

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(i \cdot j\right)\right) \cdot y + \left(\color{blue}{x} \cdot z\right) \cdot y \]
      11. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y + \left(\color{blue}{x} \cdot z\right) \cdot y \]
      12. lift-neg.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right) \]
      21. lift-*.f6466.9

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right) \]
    6. Applied rewrites66.9%

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

Alternative 3: 64.2% accurate, 1.1× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.20000000000000006e110

    1. Initial program 63.4%

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

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

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

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

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

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

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

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

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

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

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

    if -1.20000000000000006e110 < y < 4.00000000000000009e-287

    1. Initial program 79.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
      17. lower-*.f6461.6

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

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

    if 4.00000000000000009e-287 < y < 9.5999999999999999e76

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.5999999999999999e76 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-i\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lift-neg.f64N/A

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(i \cdot j\right)\right) \cdot y + \left(\color{blue}{x} \cdot z\right) \cdot y \]
      11. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y + \left(\color{blue}{x} \cdot z\right) \cdot y \]
      12. lift-neg.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right) \]
      21. lift-*.f6461.9

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right) \]
    6. Applied rewrites61.9%

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

Alternative 4: 63.1% accurate, 1.1× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.20000000000000006e110

    1. Initial program 63.4%

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

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

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

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

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

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

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

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

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

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

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

    if -1.20000000000000006e110 < y < 1.70000000000000013e-291

    1. Initial program 78.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. lower--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.70000000000000013e-291 < y < 9.5999999999999999e76

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.5999999999999999e76 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-i\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lift-neg.f64N/A

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(i \cdot j\right)\right) \cdot y + \left(\color{blue}{x} \cdot z\right) \cdot y \]
      11. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y + \left(\color{blue}{x} \cdot z\right) \cdot y \]
      12. lift-neg.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right) \]
      21. lift-*.f6461.9

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right) \]
    6. Applied rewrites61.9%

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

Alternative 5: 63.1% accurate, 0.5× speedup?

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

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

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


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

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

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

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

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

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

      \[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - \color{blue}{\left(c \cdot b\right) \cdot z}\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 y around inf

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

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

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

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

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

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

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

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

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

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

Alternative 6: 61.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+70}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.49999999999999978e70

    1. Initial program 65.4%

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

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

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

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

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

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

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

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

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

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

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

    if -6.49999999999999978e70 < y < 4.50000000000000005e-286

    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 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. lower--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
      17. lower-*.f6462.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.50000000000000005e-286 < y < 9.5999999999999999e76

    1. Initial program 80.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.5999999999999999e76 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-i\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lift-neg.f64N/A

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(i \cdot j\right)\right) \cdot y + \left(\color{blue}{x} \cdot z\right) \cdot y \]
      11. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y + \left(\color{blue}{x} \cdot z\right) \cdot y \]
      12. lift-neg.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right) \]
      21. lift-*.f6461.9

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right) \]
    6. Applied rewrites61.9%

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

Alternative 7: 60.9% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;y \leq 1.8 \cdot 10^{-232}:\\
\;\;\;\;t\_1 - c \cdot \left(b \cdot z\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -6.49999999999999978e70

    1. Initial program 65.4%

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

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

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

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

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

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

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

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

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

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

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

    if -6.49999999999999978e70 < y < 1.80000000000000008e-232

    1. Initial program 79.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.80000000000000008e-232 < y < 9.79999999999999944e-86

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right) \cdot b \]
      6. negate-sub2N/A

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

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

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

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      10. lift-*.f6443.8

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

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

    if 9.79999999999999944e-86 < y < 7.49999999999999934e78

    1. Initial program 78.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 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. lower--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.49999999999999934e78 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-i\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lift-neg.f64N/A

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(i \cdot j\right)\right) \cdot y + \left(\color{blue}{x} \cdot z\right) \cdot y \]
      11. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y + \left(\color{blue}{x} \cdot z\right) \cdot y \]
      12. lift-neg.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right) \]
      21. lift-*.f6462.0

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right) \]
    6. Applied rewrites62.0%

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

Alternative 8: 59.5% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+70}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -6.49999999999999978e70

    1. Initial program 65.4%

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

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

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

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

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

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

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

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

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

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

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

    if -6.49999999999999978e70 < y < 1.80000000000000008e-232

    1. Initial program 79.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.80000000000000008e-232 < y < 8.20000000000000005e-75

    1. Initial program 80.6%

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right) \cdot b \]
      6. negate-sub2N/A

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

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

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

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      10. lift-*.f6444.0

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

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

    if 8.20000000000000005e-75 < y < 6.80000000000000014e78

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

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

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

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

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

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

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

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

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x - i \cdot \color{blue}{b}\right) \]
      8. lower-*.f6437.2

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

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

    if 6.80000000000000014e78 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-i\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lift-neg.f64N/A

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(i \cdot j\right)\right) \cdot y + \left(\color{blue}{x} \cdot z\right) \cdot y \]
      11. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y + \left(\color{blue}{x} \cdot z\right) \cdot y \]
      12. lift-neg.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right) \]
      21. lift-*.f6462.0

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right) \]
    6. Applied rewrites62.0%

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

Alternative 9: 57.9% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+69}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\

\mathbf{elif}\;y \leq 1.95 \cdot 10^{-286}:\\
\;\;\;\;\left(t \cdot \left(c + \left(-\frac{a \cdot x}{j}\right)\right)\right) \cdot j\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.0000000000000001e69

    1. Initial program 65.4%

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

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

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

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

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

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

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

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

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

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

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

    if -1.0000000000000001e69 < y < 1.94999999999999998e-286

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(t \cdot \left(c + \left(-\frac{a \cdot x}{j}\right)\right)\right) \cdot j \]
      6. lower-*.f6442.9

        \[\leadsto \left(t \cdot \left(c + \left(-\frac{a \cdot x}{j}\right)\right)\right) \cdot j \]
    7. Applied rewrites42.9%

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

    if 1.94999999999999998e-286 < y < 8.20000000000000005e-75

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right) \cdot b \]
      6. negate-sub2N/A

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

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

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

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      10. lift-*.f6445.7

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

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

    if 8.20000000000000005e-75 < y < 6.80000000000000014e78

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

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

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

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

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

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

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

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

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x - i \cdot \color{blue}{b}\right) \]
      8. lower-*.f6437.2

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

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

    if 6.80000000000000014e78 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-i\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lift-neg.f64N/A

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(i \cdot j\right)\right) \cdot y + \left(\color{blue}{x} \cdot z\right) \cdot y \]
      11. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y + \left(\color{blue}{x} \cdot z\right) \cdot y \]
      12. lift-neg.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right) \]
      21. lift-*.f6462.0

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right) \]
    6. Applied rewrites62.0%

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

Alternative 10: 56.1% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+68}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\

\mathbf{elif}\;y \leq 1.95 \cdot 10^{-286}:\\
\;\;\;\;\left(c \cdot \left(j + \left(-\frac{a \cdot x}{c}\right)\right)\right) \cdot t\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -5.1999999999999996e68

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

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

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

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

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

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

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

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

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

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

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

    if -5.1999999999999996e68 < y < 1.94999999999999998e-286

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(c \cdot \left(j + \left(-\frac{a \cdot x}{c}\right)\right)\right) \cdot t \]
      6. lower-*.f6443.7

        \[\leadsto \left(c \cdot \left(j + \left(-\frac{a \cdot x}{c}\right)\right)\right) \cdot t \]
    7. Applied rewrites43.7%

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

    if 1.94999999999999998e-286 < y < 8.20000000000000005e-75

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right) \cdot b \]
      6. negate-sub2N/A

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

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

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

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      10. lift-*.f6445.7

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

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

    if 8.20000000000000005e-75 < y < 6.80000000000000014e78

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

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

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

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

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

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

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

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

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x - i \cdot \color{blue}{b}\right) \]
      8. lower-*.f6437.2

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

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

    if 6.80000000000000014e78 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-i\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lift-neg.f64N/A

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(i \cdot j\right)\right) \cdot y + \left(\color{blue}{x} \cdot z\right) \cdot y \]
      11. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y + \left(\color{blue}{x} \cdot z\right) \cdot y \]
      12. lift-neg.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right) \]
      21. lift-*.f6462.0

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right) \]
    6. Applied rewrites62.0%

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

Alternative 11: 52.8% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.06 \cdot 10^{+68}:\\ \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{-286}:\\ \;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{-75}:\\ \;\;\;\;\left(i \cdot a - c \cdot z\right) \cdot b\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{+78}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x - i \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= y -1.06e+68)
   (* (fma (- i) j (* z x)) y)
   (if (<= y 1.95e-286)
     (* (fma (- a) x (* j c)) t)
     (if (<= y 8.2e-75)
       (* (- (* i a) (* c z)) b)
       (if (<= y 6.8e+78)
         (* (- a) (- (* t x) (* i b)))
         (fma (* (- i) j) y (* (* z x) y)))))))
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.06e+68) {
		tmp = fma(-i, j, (z * x)) * y;
	} else if (y <= 1.95e-286) {
		tmp = fma(-a, x, (j * c)) * t;
	} else if (y <= 8.2e-75) {
		tmp = ((i * a) - (c * z)) * b;
	} else if (y <= 6.8e+78) {
		tmp = -a * ((t * x) - (i * b));
	} else {
		tmp = fma((-i * j), y, ((z * x) * y));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (y <= -1.06e+68)
		tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y);
	elseif (y <= 1.95e-286)
		tmp = Float64(fma(Float64(-a), x, Float64(j * c)) * t);
	elseif (y <= 8.2e-75)
		tmp = Float64(Float64(Float64(i * a) - Float64(c * z)) * b);
	elseif (y <= 6.8e+78)
		tmp = Float64(Float64(-a) * Float64(Float64(t * x) - Float64(i * b)));
	else
		tmp = fma(Float64(Float64(-i) * j), y, Float64(Float64(z * x) * y));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -1.06e+68], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 1.95e-286], N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 8.2e-75], N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[y, 6.8e+78], N[((-a) * N[(N[(t * x), $MachinePrecision] - N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * j), $MachinePrecision] * y + N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.06 \cdot 10^{+68}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.06e68

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

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

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

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

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

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

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

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

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

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

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

    if -1.06e68 < y < 1.94999999999999998e-286

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

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

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

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

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

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

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

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

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

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

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

    if 1.94999999999999998e-286 < y < 8.20000000000000005e-75

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right) \cdot b \]
      6. negate-sub2N/A

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

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

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

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      10. lift-*.f6445.7

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

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

    if 8.20000000000000005e-75 < y < 6.80000000000000014e78

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

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

        \[\leadsto \left(-1 \cdot a\right) \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
      5. lower--.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x - \color{blue}{b \cdot i}\right) \]
      6. lower-*.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x - \color{blue}{b} \cdot i\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x - i \cdot \color{blue}{b}\right) \]
      8. lower-*.f6437.2

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x - i \cdot \color{blue}{b}\right) \]
    4. Applied rewrites37.2%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(t \cdot x - i \cdot b\right)} \]

    if 6.80000000000000014e78 < y

    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 y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(-1 \cdot i, j, x \cdot z\right) \cdot y \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6464.2

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites64.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot \color{blue}{y} \]
      2. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      3. lift-fma.f64N/A

        \[\leadsto \left(\left(-i\right) \cdot j + z \cdot x\right) \cdot y \]
      4. *-commutativeN/A

        \[\leadsto \left(\left(-i\right) \cdot j + x \cdot z\right) \cdot y \]
      5. lift-neg.f64N/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j + x \cdot z\right) \cdot y \]
      6. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i \cdot j\right)\right) + x \cdot z\right) \cdot y \]
      7. mul-1-negN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot y \]
      8. *-commutativeN/A

        \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
      9. distribute-rgt-inN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right)\right) \cdot y + \color{blue}{\left(x \cdot z\right) \cdot y} \]
      10. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(i \cdot j\right)\right) \cdot y + \left(\color{blue}{x} \cdot z\right) \cdot y \]
      11. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y + \left(\color{blue}{x} \cdot z\right) \cdot y \]
      12. lift-neg.f64N/A

        \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y + \left(x \cdot z\right) \cdot y \]
      13. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, \color{blue}{y}, \left(x \cdot z\right) \cdot y\right) \]
      14. lift-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(i\right)\right) \cdot j, y, \left(x \cdot z\right) \cdot y\right) \]
      15. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\left(-1 \cdot i\right) \cdot j, y, \left(x \cdot z\right) \cdot y\right) \]
      16. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(-1 \cdot i\right) \cdot j, y, \left(x \cdot z\right) \cdot y\right) \]
      17. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(i\right)\right) \cdot j, y, \left(x \cdot z\right) \cdot y\right) \]
      18. lift-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(x \cdot z\right) \cdot y\right) \]
      19. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(x \cdot z\right) \cdot y\right) \]
      20. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right) \]
      21. lift-*.f6462.0

        \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, y, \left(z \cdot x\right) \cdot y\right) \]
    6. Applied rewrites62.0%

      \[\leadsto \mathsf{fma}\left(\left(-i\right) \cdot j, \color{blue}{y}, \left(z \cdot x\right) \cdot y\right) \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 12: 52.6% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \mathbf{if}\;y \leq -1.06 \cdot 10^{+68}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{-286}:\\ \;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{-75}:\\ \;\;\;\;\left(i \cdot a - c \cdot z\right) \cdot b\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{+78}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x - i \cdot b\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 (- i) j (* z x)) y)))
   (if (<= y -1.06e+68)
     t_1
     (if (<= y 1.95e-286)
       (* (fma (- a) x (* j c)) t)
       (if (<= y 8.2e-75)
         (* (- (* i a) (* c z)) b)
         (if (<= y 6.8e+78) (* (- a) (- (* t x) (* i 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 = fma(-i, j, (z * x)) * y;
	double tmp;
	if (y <= -1.06e+68) {
		tmp = t_1;
	} else if (y <= 1.95e-286) {
		tmp = fma(-a, x, (j * c)) * t;
	} else if (y <= 8.2e-75) {
		tmp = ((i * a) - (c * z)) * b;
	} else if (y <= 6.8e+78) {
		tmp = -a * ((t * x) - (i * b));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(fma(Float64(-i), j, Float64(z * x)) * y)
	tmp = 0.0
	if (y <= -1.06e+68)
		tmp = t_1;
	elseif (y <= 1.95e-286)
		tmp = Float64(fma(Float64(-a), x, Float64(j * c)) * t);
	elseif (y <= 8.2e-75)
		tmp = Float64(Float64(Float64(i * a) - Float64(c * z)) * b);
	elseif (y <= 6.8e+78)
		tmp = Float64(Float64(-a) * Float64(Float64(t * x) - Float64(i * b)));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.06e+68], t$95$1, If[LessEqual[y, 1.95e-286], N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 8.2e-75], N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[y, 6.8e+78], N[((-a) * N[(N[(t * x), $MachinePrecision] - N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -1.06 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.95 \cdot 10^{-286}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\

\mathbf{elif}\;y \leq 8.2 \cdot 10^{-75}:\\
\;\;\;\;\left(i \cdot a - c \cdot z\right) \cdot b\\

\mathbf{elif}\;y \leq 6.8 \cdot 10^{+78}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x - i \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.06e68 or 6.80000000000000014e78 < y

    1. Initial program 65.1%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(-1 \cdot i, j, x \cdot z\right) \cdot y \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6464.6

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites64.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]

    if -1.06e68 < y < 1.94999999999999998e-286

    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 t around inf

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6444.5

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    4. Applied rewrites44.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]

    if 1.94999999999999998e-286 < y < 8.20000000000000005e-75

    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 b around inf

      \[\leadsto \color{blue}{b \cdot \left(a \cdot i - c \cdot z\right)} \]
    3. Step-by-step derivation
      1. negate-sub2N/A

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto b \cdot \left(-1 \cdot \color{blue}{\left(c \cdot z - a \cdot i\right)}\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(c \cdot z - a \cdot i\right)\right) \cdot \color{blue}{b} \]
      4. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(c \cdot z - a \cdot i\right)\right) \cdot \color{blue}{b} \]
      5. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right) \cdot b \]
      6. negate-sub2N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot b \]
      7. lower--.f64N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot b \]
      8. *-commutativeN/A

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      9. lift-*.f64N/A

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      10. lift-*.f6445.7

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
    4. Applied rewrites45.7%

      \[\leadsto \color{blue}{\left(i \cdot a - c \cdot z\right) \cdot b} \]

    if 8.20000000000000005e-75 < y < 6.80000000000000014e78

    1. Initial program 78.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 a around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)} \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{\left(t \cdot x - b \cdot i\right)} \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(\color{blue}{t \cdot x} - b \cdot i\right) \]
      5. lower--.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x - \color{blue}{b \cdot i}\right) \]
      6. lower-*.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x - \color{blue}{b} \cdot i\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x - i \cdot \color{blue}{b}\right) \]
      8. lower-*.f6437.2

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x - i \cdot \color{blue}{b}\right) \]
    4. Applied rewrites37.2%

      \[\leadsto \color{blue}{\left(-a\right) \cdot \left(t \cdot x - i \cdot b\right)} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 13: 51.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(c \cdot t - i \cdot y\right)\\ \mathbf{if}\;j \leq -6.2 \cdot 10^{-26}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x + t\_1\\ \mathbf{elif}\;j \leq 2.45 \cdot 10^{+50}:\\ \;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot b\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(i \cdot b\right) \cdot a + t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* j (- (* c t) (* i y)))))
   (if (<= j -6.2e-26)
     (+ (* (* z y) x) t_1)
     (if (<= j 2.45e+50)
       (- (* (- (* z y) (* a t)) x) (* (* c b) z))
       (+ (* (* i b) a) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = j * ((c * t) - (i * y));
	double tmp;
	if (j <= -6.2e-26) {
		tmp = ((z * y) * x) + t_1;
	} else if (j <= 2.45e+50) {
		tmp = (((z * y) - (a * t)) * x) - ((c * b) * z);
	} else {
		tmp = ((i * b) * a) + 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) - (i * y))
    if (j <= (-6.2d-26)) then
        tmp = ((z * y) * x) + t_1
    else if (j <= 2.45d+50) then
        tmp = (((z * y) - (a * t)) * x) - ((c * b) * z)
    else
        tmp = ((i * b) * a) + 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) - (i * y));
	double tmp;
	if (j <= -6.2e-26) {
		tmp = ((z * y) * x) + t_1;
	} else if (j <= 2.45e+50) {
		tmp = (((z * y) - (a * t)) * x) - ((c * b) * z);
	} else {
		tmp = ((i * b) * a) + t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = j * ((c * t) - (i * y))
	tmp = 0
	if j <= -6.2e-26:
		tmp = ((z * y) * x) + t_1
	elif j <= 2.45e+50:
		tmp = (((z * y) - (a * t)) * x) - ((c * b) * z)
	else:
		tmp = ((i * b) * a) + t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(j * Float64(Float64(c * t) - Float64(i * y)))
	tmp = 0.0
	if (j <= -6.2e-26)
		tmp = Float64(Float64(Float64(z * y) * x) + t_1);
	elseif (j <= 2.45e+50)
		tmp = Float64(Float64(Float64(Float64(z * y) - Float64(a * t)) * x) - Float64(Float64(c * b) * z));
	else
		tmp = Float64(Float64(Float64(i * b) * a) + t_1);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = j * ((c * t) - (i * y));
	tmp = 0.0;
	if (j <= -6.2e-26)
		tmp = ((z * y) * x) + t_1;
	elseif (j <= 2.45e+50)
		tmp = (((z * y) - (a * t)) * x) - ((c * b) * z);
	else
		tmp = ((i * b) * a) + t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -6.2e-26], N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[j, 2.45e+50], N[(N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot t - i \cdot y\right)\\
\mathbf{if}\;j \leq -6.2 \cdot 10^{-26}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x + t\_1\\

\mathbf{elif}\;j \leq 2.45 \cdot 10^{+50}:\\
\;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot b\right) \cdot z\\

\mathbf{else}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a + t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -6.19999999999999966e-26

    1. Initial program 75.4%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in y around inf

      \[\leadsto \color{blue}{x \cdot \left(y \cdot z\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(y \cdot z\right) \cdot \color{blue}{x} + j \cdot \left(c \cdot t - i \cdot y\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(y \cdot z\right) \cdot \color{blue}{x} + j \cdot \left(c \cdot t - i \cdot y\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f6461.8

        \[\leadsto \left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot t - i \cdot y\right) \]
    4. Applied rewrites61.8%

      \[\leadsto \color{blue}{\left(z \cdot y\right) \cdot x} + j \cdot \left(c \cdot t - i \cdot y\right) \]

    if -6.19999999999999966e-26 < j < 2.4500000000000001e50

    1. Initial program 73.6%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in 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. lower--.f64N/A

        \[\leadsto \left(c \cdot \left(j \cdot t\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - \color{blue}{b \cdot \left(c \cdot z\right)} \]
      2. +-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) \]
      3. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - a \cdot t\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - t \cdot a\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - \color{blue}{b} \cdot \left(c \cdot z\right) \]
      6. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      12. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
      17. lower-*.f6464.2

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
    4. Applied rewrites64.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \left(y \cdot z - a \cdot t\right) - \color{blue}{\left(c \cdot b\right)} \cdot z \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x - \left(c \cdot \color{blue}{b}\right) \cdot z \]
      2. lower-*.f64N/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x - \left(c \cdot \color{blue}{b}\right) \cdot z \]
      3. lower--.f64N/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x - \left(c \cdot b\right) \cdot z \]
      4. *-commutativeN/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot b\right) \cdot z \]
      5. lift-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot b\right) \cdot z \]
      6. lift-*.f6459.1

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot b\right) \cdot z \]
    7. Applied rewrites59.1%

      \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \color{blue}{\left(c \cdot b\right)} \cdot z \]

    if 2.4500000000000001e50 < j

    1. Initial program 73.5%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in i around inf

      \[\leadsto \color{blue}{a \cdot \left(b \cdot i\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot i\right) \cdot \color{blue}{a} + j \cdot \left(c \cdot t - i \cdot y\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot \color{blue}{a} + j \cdot \left(c \cdot t - i \cdot y\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f6464.2

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
    4. Applied rewrites64.2%

      \[\leadsto \color{blue}{\left(i \cdot b\right) \cdot a} + j \cdot \left(c \cdot t - i \cdot y\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 14: 51.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{+86}:\\ \;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-144}:\\ \;\;\;\;\left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot b\right) \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= z -1.8e+86)
   (* (- (* y x) (* c b)) z)
   (if (<= z 2.15e-144)
     (+ (* (* i b) a) (* j (- (* c t) (* i y))))
     (- (* (- (* z y) (* a t)) x) (* (* c b) z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (z <= -1.8e+86) {
		tmp = ((y * x) - (c * b)) * z;
	} else if (z <= 2.15e-144) {
		tmp = ((i * b) * a) + (j * ((c * t) - (i * y)));
	} else {
		tmp = (((z * y) - (a * t)) * x) - ((c * b) * z);
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (z <= (-1.8d+86)) then
        tmp = ((y * x) - (c * b)) * z
    else if (z <= 2.15d-144) then
        tmp = ((i * b) * a) + (j * ((c * t) - (i * y)))
    else
        tmp = (((z * y) - (a * t)) * x) - ((c * b) * z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (z <= -1.8e+86) {
		tmp = ((y * x) - (c * b)) * z;
	} else if (z <= 2.15e-144) {
		tmp = ((i * b) * a) + (j * ((c * t) - (i * y)));
	} else {
		tmp = (((z * y) - (a * t)) * x) - ((c * b) * z);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if z <= -1.8e+86:
		tmp = ((y * x) - (c * b)) * z
	elif z <= 2.15e-144:
		tmp = ((i * b) * a) + (j * ((c * t) - (i * y)))
	else:
		tmp = (((z * y) - (a * t)) * x) - ((c * b) * z)
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (z <= -1.8e+86)
		tmp = Float64(Float64(Float64(y * x) - Float64(c * b)) * z);
	elseif (z <= 2.15e-144)
		tmp = Float64(Float64(Float64(i * b) * a) + Float64(j * Float64(Float64(c * t) - Float64(i * y))));
	else
		tmp = Float64(Float64(Float64(Float64(z * y) - Float64(a * t)) * x) - Float64(Float64(c * b) * z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (z <= -1.8e+86)
		tmp = ((y * x) - (c * b)) * z;
	elseif (z <= 2.15e-144)
		tmp = ((i * b) * a) + (j * ((c * t) - (i * y)));
	else
		tmp = (((z * y) - (a * t)) * x) - ((c * b) * z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -1.8e+86], N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 2.15e-144], N[(N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(c * b), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+86}:\\
\;\;\;\;\left(y \cdot x - c \cdot b\right) \cdot z\\

\mathbf{elif}\;z \leq 2.15 \cdot 10^{-144}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right)\\

\mathbf{else}:\\
\;\;\;\;\left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot b\right) \cdot z\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.80000000000000003e86

    1. Initial program 63.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 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-*.f6465.7

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
    4. Applied rewrites65.7%

      \[\leadsto \color{blue}{\left(y \cdot x - c \cdot b\right) \cdot z} \]

    if -1.80000000000000003e86 < z < 2.14999999999999995e-144

    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 i around inf

      \[\leadsto \color{blue}{a \cdot \left(b \cdot i\right)} + j \cdot \left(c \cdot t - i \cdot y\right) \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot i\right) \cdot \color{blue}{a} + j \cdot \left(c \cdot t - i \cdot y\right) \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot \color{blue}{a} + j \cdot \left(c \cdot t - i \cdot y\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
      4. lower-*.f6458.9

        \[\leadsto \left(i \cdot b\right) \cdot a + j \cdot \left(c \cdot t - i \cdot y\right) \]
    4. Applied rewrites58.9%

      \[\leadsto \color{blue}{\left(i \cdot b\right) \cdot a} + j \cdot \left(c \cdot t - i \cdot y\right) \]

    if 2.14999999999999995e-144 < z

    1. Initial program 71.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 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. lower--.f64N/A

        \[\leadsto \left(c \cdot \left(j \cdot t\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - \color{blue}{b \cdot \left(c \cdot z\right)} \]
      2. +-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) \]
      3. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - a \cdot t\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - t \cdot a\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - \color{blue}{b} \cdot \left(c \cdot z\right) \]
      6. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      12. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
      17. lower-*.f6463.4

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
    4. Applied rewrites63.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z} \]
    5. Taylor expanded in x around inf

      \[\leadsto x \cdot \left(y \cdot z - a \cdot t\right) - \color{blue}{\left(c \cdot b\right)} \cdot z \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x - \left(c \cdot \color{blue}{b}\right) \cdot z \]
      2. lower-*.f64N/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x - \left(c \cdot \color{blue}{b}\right) \cdot z \]
      3. lower--.f64N/A

        \[\leadsto \left(y \cdot z - a \cdot t\right) \cdot x - \left(c \cdot b\right) \cdot z \]
      4. *-commutativeN/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot b\right) \cdot z \]
      5. lift-*.f64N/A

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot b\right) \cdot z \]
      6. lift-*.f6457.3

        \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \left(c \cdot b\right) \cdot z \]
    7. Applied rewrites57.3%

      \[\leadsto \left(z \cdot y - a \cdot t\right) \cdot x - \color{blue}{\left(c \cdot b\right)} \cdot z \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 15: 51.1% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \mathbf{if}\;y \leq -1.06 \cdot 10^{+68}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{-286}:\\ \;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\ \mathbf{elif}\;y \leq 1.12 \cdot 10^{+76}:\\ \;\;\;\;\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 (* (fma (- i) j (* z x)) y)))
   (if (<= y -1.06e+68)
     t_1
     (if (<= y 1.95e-286)
       (* (fma (- a) x (* j c)) t)
       (if (<= y 1.12e+76) (* (- (* 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 = fma(-i, j, (z * x)) * y;
	double tmp;
	if (y <= -1.06e+68) {
		tmp = t_1;
	} else if (y <= 1.95e-286) {
		tmp = fma(-a, x, (j * c)) * t;
	} else if (y <= 1.12e+76) {
		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(fma(Float64(-i), j, Float64(z * x)) * y)
	tmp = 0.0
	if (y <= -1.06e+68)
		tmp = t_1;
	elseif (y <= 1.95e-286)
		tmp = Float64(fma(Float64(-a), x, Float64(j * c)) * t);
	elseif (y <= 1.12e+76)
		tmp = Float64(Float64(Float64(i * a) - Float64(c * z)) * b);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.06e+68], t$95$1, If[LessEqual[y, 1.95e-286], N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 1.12e+76], N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -1.06 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.95 \cdot 10^{-286}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\

\mathbf{elif}\;y \leq 1.12 \cdot 10^{+76}:\\
\;\;\;\;\left(i \cdot a - c \cdot z\right) \cdot b\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.06e68 or 1.12000000000000005e76 < y

    1. Initial program 65.1%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(-1 \cdot i, j, x \cdot z\right) \cdot y \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6464.5

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites64.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]

    if -1.06e68 < y < 1.94999999999999998e-286

    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 t around inf

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6444.5

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    4. Applied rewrites44.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]

    if 1.94999999999999998e-286 < y < 1.12000000000000005e76

    1. Initial program 80.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in b around inf

      \[\leadsto \color{blue}{b \cdot \left(a \cdot i - c \cdot z\right)} \]
    3. Step-by-step derivation
      1. negate-sub2N/A

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto b \cdot \left(-1 \cdot \color{blue}{\left(c \cdot z - a \cdot i\right)}\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(c \cdot z - a \cdot i\right)\right) \cdot \color{blue}{b} \]
      4. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(c \cdot z - a \cdot i\right)\right) \cdot \color{blue}{b} \]
      5. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right) \cdot b \]
      6. negate-sub2N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot b \]
      7. lower--.f64N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot b \]
      8. *-commutativeN/A

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      9. lift-*.f64N/A

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      10. lift-*.f6442.2

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
    4. Applied rewrites42.2%

      \[\leadsto \color{blue}{\left(i \cdot a - c \cdot z\right) \cdot b} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 16: 51.1% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y \cdot x - c \cdot b\right) \cdot z\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{+86}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.45 \cdot 10^{-293}:\\ \;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-34}:\\ \;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (- (* y x) (* c b)) z)))
   (if (<= z -1.8e+86)
     t_1
     (if (<= z 2.45e-293)
       (* (fma (- a) x (* j c)) t)
       (if (<= z 2.9e-34) (* (- (* c t) (* i y)) j) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((y * x) - (c * b)) * z;
	double tmp;
	if (z <= -1.8e+86) {
		tmp = t_1;
	} else if (z <= 2.45e-293) {
		tmp = fma(-a, x, (j * c)) * t;
	} else if (z <= 2.9e-34) {
		tmp = ((c * t) - (i * y)) * j;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(Float64(y * x) - Float64(c * b)) * z)
	tmp = 0.0
	if (z <= -1.8e+86)
		tmp = t_1;
	elseif (z <= 2.45e-293)
		tmp = Float64(fma(Float64(-a), x, Float64(j * c)) * t);
	elseif (z <= 2.9e-34)
		tmp = Float64(Float64(Float64(c * t) - Float64(i * y)) * j);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -1.8e+86], t$95$1, If[LessEqual[z, 2.45e-293], N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 2.9e-34], N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.45 \cdot 10^{-293}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\

\mathbf{elif}\;z \leq 2.9 \cdot 10^{-34}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.80000000000000003e86 or 2.9000000000000002e-34 < z

    1. Initial program 66.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in z around inf

      \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot \color{blue}{z} \]
      2. lower-*.f64N/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot \color{blue}{z} \]
      3. lower--.f64N/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot z \]
      4. *-commutativeN/A

        \[\leadsto \left(y \cdot x - b \cdot c\right) \cdot z \]
      5. lower-*.f64N/A

        \[\leadsto \left(y \cdot x - b \cdot c\right) \cdot z \]
      6. *-commutativeN/A

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
      7. lower-*.f6461.5

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
    4. Applied rewrites61.5%

      \[\leadsto \color{blue}{\left(y \cdot x - c \cdot b\right) \cdot z} \]

    if -1.80000000000000003e86 < z < 2.45e-293

    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 t around inf

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6444.0

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    4. Applied rewrites44.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]

    if 2.45e-293 < z < 2.9000000000000002e-34

    1. Initial program 81.2%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in 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-*.f6447.0

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites47.0%

      \[\leadsto \color{blue}{\left(c \cdot t - i \cdot y\right) \cdot j} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 17: 50.8% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(y \cdot x - c \cdot b\right) \cdot z\\ \mathbf{if}\;z \leq -1.3 \cdot 10^{+49}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-34}:\\ \;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (- (* y x) (* c b)) z)))
   (if (<= z -1.3e+49) t_1 (if (<= z 2.9e-34) (* (- (* c t) (* i y)) j) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((y * x) - (c * b)) * z;
	double tmp;
	if (z <= -1.3e+49) {
		tmp = t_1;
	} else if (z <= 2.9e-34) {
		tmp = ((c * t) - (i * y)) * j;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((y * x) - (c * b)) * z
    if (z <= (-1.3d+49)) then
        tmp = t_1
    else if (z <= 2.9d-34) then
        tmp = ((c * t) - (i * y)) * j
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((y * x) - (c * b)) * z;
	double tmp;
	if (z <= -1.3e+49) {
		tmp = t_1;
	} else if (z <= 2.9e-34) {
		tmp = ((c * t) - (i * y)) * j;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = ((y * x) - (c * b)) * z
	tmp = 0
	if z <= -1.3e+49:
		tmp = t_1
	elif z <= 2.9e-34:
		tmp = ((c * t) - (i * y)) * j
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(Float64(y * x) - Float64(c * b)) * z)
	tmp = 0.0
	if (z <= -1.3e+49)
		tmp = t_1;
	elseif (z <= 2.9e-34)
		tmp = Float64(Float64(Float64(c * t) - Float64(i * y)) * j);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = ((y * x) - (c * b)) * z;
	tmp = 0.0;
	if (z <= -1.3e+49)
		tmp = t_1;
	elseif (z <= 2.9e-34)
		tmp = ((c * t) - (i * y)) * j;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(y * x), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -1.3e+49], t$95$1, If[LessEqual[z, 2.9e-34], N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(y \cdot x - c \cdot b\right) \cdot z\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.9 \cdot 10^{-34}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.29999999999999994e49 or 2.9000000000000002e-34 < z

    1. Initial program 66.4%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in z around inf

      \[\leadsto \color{blue}{z \cdot \left(x \cdot y - b \cdot c\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot \color{blue}{z} \]
      2. lower-*.f64N/A

        \[\leadsto \left(x \cdot y - b \cdot c\right) \cdot \color{blue}{z} \]
      3. 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-*.f6460.5

        \[\leadsto \left(y \cdot x - c \cdot b\right) \cdot z \]
    4. Applied rewrites60.5%

      \[\leadsto \color{blue}{\left(y \cdot x - c \cdot b\right) \cdot z} \]

    if -1.29999999999999994e49 < z < 2.9000000000000002e-34

    1. Initial program 81.4%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
      2. lower-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
      3. lift--.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6445.5

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites45.5%

      \[\leadsto \color{blue}{\left(c \cdot t - i \cdot y\right) \cdot j} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 18: 50.5% 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 -2.6 \cdot 10^{-25}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq 2.25 \cdot 10^{-57}:\\ \;\;\;\;\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 (* (- (* c t) (* i y)) j)))
   (if (<= j -2.6e-25)
     t_1
     (if (<= j 2.25e-57) (* (- (* 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 = ((c * t) - (i * y)) * j;
	double tmp;
	if (j <= -2.6e-25) {
		tmp = t_1;
	} else if (j <= 2.25e-57) {
		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 = ((c * t) - (i * y)) * j
    if (j <= (-2.6d-25)) then
        tmp = t_1
    else if (j <= 2.25d-57) 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 = ((c * t) - (i * y)) * j;
	double tmp;
	if (j <= -2.6e-25) {
		tmp = t_1;
	} else if (j <= 2.25e-57) {
		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 = ((c * t) - (i * y)) * j
	tmp = 0
	if j <= -2.6e-25:
		tmp = t_1
	elif j <= 2.25e-57:
		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(c * t) - Float64(i * y)) * j)
	tmp = 0.0
	if (j <= -2.6e-25)
		tmp = t_1;
	elseif (j <= 2.25e-57)
		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 = ((c * t) - (i * y)) * j;
	tmp = 0.0;
	if (j <= -2.6e-25)
		tmp = t_1;
	elseif (j <= 2.25e-57)
		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[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -2.6e-25], t$95$1, If[LessEqual[j, 2.25e-57], 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(c \cdot t - i \cdot y\right) \cdot j\\
\mathbf{if}\;j \leq -2.6 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq 2.25 \cdot 10^{-57}:\\
\;\;\;\;\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 j < -2.6e-25 or 2.24999999999999986e-57 < j

    1. Initial program 74.6%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in 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.9

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites54.9%

      \[\leadsto \color{blue}{\left(c \cdot t - i \cdot y\right) \cdot j} \]

    if -2.6e-25 < j < 2.24999999999999986e-57

    1. Initial program 73.4%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in b around inf

      \[\leadsto \color{blue}{b \cdot \left(a \cdot i - c \cdot z\right)} \]
    3. Step-by-step derivation
      1. negate-sub2N/A

        \[\leadsto b \cdot \left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto b \cdot \left(-1 \cdot \color{blue}{\left(c \cdot z - a \cdot i\right)}\right) \]
      3. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(c \cdot z - a \cdot i\right)\right) \cdot \color{blue}{b} \]
      4. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(c \cdot z - a \cdot i\right)\right) \cdot \color{blue}{b} \]
      5. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(\left(c \cdot z - a \cdot i\right)\right)\right) \cdot b \]
      6. negate-sub2N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot b \]
      7. lower--.f64N/A

        \[\leadsto \left(a \cdot i - c \cdot z\right) \cdot b \]
      8. *-commutativeN/A

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      9. lift-*.f64N/A

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
      10. lift-*.f6446.0

        \[\leadsto \left(i \cdot a - c \cdot z\right) \cdot b \]
    4. Applied rewrites46.0%

      \[\leadsto \color{blue}{\left(i \cdot a - c \cdot z\right) \cdot b} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 19: 40.4% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot y\right) \cdot x\\ \mathbf{if}\;z \leq -2.4 \cdot 10^{+90}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.2 \cdot 10^{-40}:\\ \;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* z y) x)))
   (if (<= z -2.4e+90) t_1 (if (<= z 1.2e-40) (* (- (* c t) (* i y)) j) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (z * y) * x;
	double tmp;
	if (z <= -2.4e+90) {
		tmp = t_1;
	} else if (z <= 1.2e-40) {
		tmp = ((c * t) - (i * y)) * j;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z * y) * x
    if (z <= (-2.4d+90)) then
        tmp = t_1
    else if (z <= 1.2d-40) then
        tmp = ((c * t) - (i * y)) * j
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (z * y) * x;
	double tmp;
	if (z <= -2.4e+90) {
		tmp = t_1;
	} else if (z <= 1.2e-40) {
		tmp = ((c * t) - (i * y)) * j;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (z * y) * x
	tmp = 0
	if z <= -2.4e+90:
		tmp = t_1
	elif z <= 1.2e-40:
		tmp = ((c * t) - (i * y)) * j
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(z * y) * x)
	tmp = 0.0
	if (z <= -2.4e+90)
		tmp = t_1;
	elseif (z <= 1.2e-40)
		tmp = Float64(Float64(Float64(c * t) - Float64(i * y)) * j);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (z * y) * x;
	tmp = 0.0;
	if (z <= -2.4e+90)
		tmp = t_1;
	elseif (z <= 1.2e-40)
		tmp = ((c * t) - (i * y)) * j;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -2.4e+90], t$95$1, If[LessEqual[z, 1.2e-40], N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.2 \cdot 10^{-40}:\\
\;\;\;\;\left(c \cdot t - i \cdot y\right) \cdot j\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.4000000000000001e90 or 1.19999999999999996e-40 < z

    1. Initial program 66.1%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in 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. lower--.f64N/A

        \[\leadsto \left(c \cdot \left(j \cdot t\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - \color{blue}{b \cdot \left(c \cdot z\right)} \]
      2. +-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) \]
      3. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - a \cdot t\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - t \cdot a\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - \color{blue}{b} \cdot \left(c \cdot z\right) \]
      6. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      12. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
      17. lower-*.f6465.2

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
    4. Applied rewrites65.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z} \]
    5. Taylor expanded in y 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. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6435.0

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    7. Applied rewrites35.0%

      \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{x} \]

    if -2.4000000000000001e90 < z < 1.19999999999999996e-40

    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 j around inf

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
      2. lower-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
      3. lift--.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6445.0

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites45.0%

      \[\leadsto \color{blue}{\left(c \cdot t - i \cdot y\right) \cdot j} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 20: 29.9% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.3 \cdot 10^{+133}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;x \leq -7.2 \cdot 10^{-153}:\\ \;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\ \mathbf{elif}\;x \leq -5.8 \cdot 10^{-286}:\\ \;\;\;\;\left(i \cdot b\right) \cdot a\\ \mathbf{elif}\;x \leq 65000:\\ \;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{+42}:\\ \;\;\;\;\left(c \cdot j\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= x -1.3e+133)
   (* (* z y) x)
   (if (<= x -7.2e-153)
     (* (* (- i) y) j)
     (if (<= x -5.8e-286)
       (* (* i b) a)
       (if (<= x 65000.0)
         (* (- b) (* c z))
         (if (<= x 5.6e+42) (* (* c j) t) (* (* (- 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 (x <= -1.3e+133) {
		tmp = (z * y) * x;
	} else if (x <= -7.2e-153) {
		tmp = (-i * y) * j;
	} else if (x <= -5.8e-286) {
		tmp = (i * b) * a;
	} else if (x <= 65000.0) {
		tmp = -b * (c * z);
	} else if (x <= 5.6e+42) {
		tmp = (c * j) * t;
	} else {
		tmp = (-a * x) * t;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (x <= (-1.3d+133)) then
        tmp = (z * y) * x
    else if (x <= (-7.2d-153)) then
        tmp = (-i * y) * j
    else if (x <= (-5.8d-286)) then
        tmp = (i * b) * a
    else if (x <= 65000.0d0) then
        tmp = -b * (c * z)
    else if (x <= 5.6d+42) then
        tmp = (c * j) * t
    else
        tmp = (-a * x) * t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -1.3e+133) {
		tmp = (z * y) * x;
	} else if (x <= -7.2e-153) {
		tmp = (-i * y) * j;
	} else if (x <= -5.8e-286) {
		tmp = (i * b) * a;
	} else if (x <= 65000.0) {
		tmp = -b * (c * z);
	} else if (x <= 5.6e+42) {
		tmp = (c * j) * t;
	} else {
		tmp = (-a * x) * t;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if x <= -1.3e+133:
		tmp = (z * y) * x
	elif x <= -7.2e-153:
		tmp = (-i * y) * j
	elif x <= -5.8e-286:
		tmp = (i * b) * a
	elif x <= 65000.0:
		tmp = -b * (c * z)
	elif x <= 5.6e+42:
		tmp = (c * j) * t
	else:
		tmp = (-a * x) * t
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (x <= -1.3e+133)
		tmp = Float64(Float64(z * y) * x);
	elseif (x <= -7.2e-153)
		tmp = Float64(Float64(Float64(-i) * y) * j);
	elseif (x <= -5.8e-286)
		tmp = Float64(Float64(i * b) * a);
	elseif (x <= 65000.0)
		tmp = Float64(Float64(-b) * Float64(c * z));
	elseif (x <= 5.6e+42)
		tmp = Float64(Float64(c * j) * t);
	else
		tmp = Float64(Float64(Float64(-a) * x) * t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (x <= -1.3e+133)
		tmp = (z * y) * x;
	elseif (x <= -7.2e-153)
		tmp = (-i * y) * j;
	elseif (x <= -5.8e-286)
		tmp = (i * b) * a;
	elseif (x <= 65000.0)
		tmp = -b * (c * z);
	elseif (x <= 5.6e+42)
		tmp = (c * j) * t;
	else
		tmp = (-a * x) * t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -1.3e+133], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, -7.2e-153], N[(N[((-i) * y), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[x, -5.8e-286], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[x, 65000.0], N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.6e+42], N[(N[(c * j), $MachinePrecision] * t), $MachinePrecision], N[(N[((-a) * x), $MachinePrecision] * t), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+133}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\

\mathbf{elif}\;x \leq -7.2 \cdot 10^{-153}:\\
\;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\

\mathbf{elif}\;x \leq -5.8 \cdot 10^{-286}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\

\mathbf{elif}\;x \leq 65000:\\
\;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\

\mathbf{elif}\;x \leq 5.6 \cdot 10^{+42}:\\
\;\;\;\;\left(c \cdot j\right) \cdot t\\

\mathbf{else}:\\
\;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if x < -1.2999999999999999e133

    1. Initial program 73.2%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in 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. lower--.f64N/A

        \[\leadsto \left(c \cdot \left(j \cdot t\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - \color{blue}{b \cdot \left(c \cdot z\right)} \]
      2. +-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) \]
      3. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - a \cdot t\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - t \cdot a\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - \color{blue}{b} \cdot \left(c \cdot z\right) \]
      6. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      12. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
      17. lower-*.f6471.6

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
    4. Applied rewrites71.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z} \]
    5. Taylor expanded in y 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. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6440.8

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    7. Applied rewrites40.8%

      \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{x} \]

    if -1.2999999999999999e133 < x < -7.1999999999999995e-153

    1. Initial program 76.9%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in j around inf

      \[\leadsto \color{blue}{j \cdot \left(c \cdot t - i \cdot y\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
      2. lower-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot \color{blue}{j} \]
      3. lift--.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      4. lift-*.f64N/A

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
      5. lift-*.f6440.3

        \[\leadsto \left(c \cdot t - i \cdot y\right) \cdot j \]
    4. Applied rewrites40.3%

      \[\leadsto \color{blue}{\left(c \cdot t - i \cdot y\right) \cdot j} \]
    5. Taylor expanded in y around inf

      \[\leadsto \left(-1 \cdot \left(i \cdot y\right)\right) \cdot j \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y\right) \cdot j \]
      2. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot y\right) \cdot j \]
      3. lift-neg.f64N/A

        \[\leadsto \left(\left(-i\right) \cdot y\right) \cdot j \]
      4. lower-*.f6422.1

        \[\leadsto \left(\left(-i\right) \cdot y\right) \cdot j \]
    7. Applied rewrites22.1%

      \[\leadsto \left(\left(-i\right) \cdot y\right) \cdot j \]

    if -7.1999999999999995e-153 < x < -5.7999999999999996e-286

    1. Initial program 73.4%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot y - a \cdot b\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot i\right) \cdot \color{blue}{\left(j \cdot y - a \cdot b\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot i\right) \cdot \color{blue}{\left(j \cdot y - a \cdot b\right)} \]
      3. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      5. lower--.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y - \color{blue}{a \cdot b}\right) \]
      6. lower-*.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y - \color{blue}{a} \cdot b\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y - b \cdot \color{blue}{a}\right) \]
      8. lower-*.f6446.4

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y - b \cdot \color{blue}{a}\right) \]
    4. Applied rewrites46.4%

      \[\leadsto \color{blue}{\left(-i\right) \cdot \left(j \cdot y - b \cdot a\right)} \]
    5. Taylor expanded in y around 0

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lower-*.f6429.1

        \[\leadsto \left(i \cdot b\right) \cdot a \]
    7. Applied rewrites29.1%

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]

    if -5.7999999999999996e-286 < x < 65000

    1. Initial program 72.5%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in i around 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. lower--.f64N/A

        \[\leadsto \left(c \cdot \left(j \cdot t\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - \color{blue}{b \cdot \left(c \cdot z\right)} \]
      2. +-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) \]
      3. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - a \cdot t\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - t \cdot a\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - \color{blue}{b} \cdot \left(c \cdot z\right) \]
      6. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      12. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
      17. lower-*.f6449.3

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
    4. Applied rewrites49.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z} \]
    5. Taylor expanded in b around inf

      \[\leadsto -1 \cdot \color{blue}{\left(b \cdot \left(c \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot b\right) \cdot \left(c \cdot \color{blue}{z}\right) \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot \color{blue}{z}\right) \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-b\right) \cdot \left(c \cdot z\right) \]
      5. lift-*.f6427.1

        \[\leadsto \left(-b\right) \cdot \left(c \cdot z\right) \]
    7. Applied rewrites27.1%

      \[\leadsto \left(-b\right) \cdot \color{blue}{\left(c \cdot z\right)} \]

    if 65000 < x < 5.5999999999999999e42

    1. Initial program 80.6%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6443.4

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    4. Applied rewrites43.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]
    5. Taylor expanded in x around 0

      \[\leadsto \left(c \cdot j\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f6423.0

        \[\leadsto \left(c \cdot j\right) \cdot t \]
    7. Applied rewrites23.0%

      \[\leadsto \left(c \cdot j\right) \cdot t \]

    if 5.5999999999999999e42 < x

    1. Initial program 73.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6445.6

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    4. Applied rewrites45.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]
    5. Taylor expanded in x around inf

      \[\leadsto \left(-1 \cdot \left(a \cdot x\right)\right) \cdot t \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a \cdot x\right)\right) \cdot t \]
      2. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x\right) \cdot t \]
      3. lift-neg.f64N/A

        \[\leadsto \left(\left(-a\right) \cdot x\right) \cdot t \]
      4. lower-*.f6435.4

        \[\leadsto \left(\left(-a\right) \cdot x\right) \cdot t \]
    7. Applied rewrites35.4%

      \[\leadsto \left(\left(-a\right) \cdot x\right) \cdot t \]
  3. Recombined 6 regimes into one program.
  4. Add Preprocessing

Alternative 21: 29.8% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -6.5 \cdot 10^{+103}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;x \leq 5.5 \cdot 10^{-304}:\\ \;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\ \mathbf{elif}\;x \leq 65000:\\ \;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{+42}:\\ \;\;\;\;\left(c \cdot j\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= x -6.5e+103)
   (* (* z y) x)
   (if (<= x 5.5e-304)
     (* (* (- i) j) y)
     (if (<= x 65000.0)
       (* (- b) (* c z))
       (if (<= x 5.6e+42) (* (* c j) t) (* (* (- 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 (x <= -6.5e+103) {
		tmp = (z * y) * x;
	} else if (x <= 5.5e-304) {
		tmp = (-i * j) * y;
	} else if (x <= 65000.0) {
		tmp = -b * (c * z);
	} else if (x <= 5.6e+42) {
		tmp = (c * j) * t;
	} else {
		tmp = (-a * x) * t;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if (x <= (-6.5d+103)) then
        tmp = (z * y) * x
    else if (x <= 5.5d-304) then
        tmp = (-i * j) * y
    else if (x <= 65000.0d0) then
        tmp = -b * (c * z)
    else if (x <= 5.6d+42) then
        tmp = (c * j) * t
    else
        tmp = (-a * x) * t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (x <= -6.5e+103) {
		tmp = (z * y) * x;
	} else if (x <= 5.5e-304) {
		tmp = (-i * j) * y;
	} else if (x <= 65000.0) {
		tmp = -b * (c * z);
	} else if (x <= 5.6e+42) {
		tmp = (c * j) * t;
	} else {
		tmp = (-a * x) * t;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if x <= -6.5e+103:
		tmp = (z * y) * x
	elif x <= 5.5e-304:
		tmp = (-i * j) * y
	elif x <= 65000.0:
		tmp = -b * (c * z)
	elif x <= 5.6e+42:
		tmp = (c * j) * t
	else:
		tmp = (-a * x) * t
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (x <= -6.5e+103)
		tmp = Float64(Float64(z * y) * x);
	elseif (x <= 5.5e-304)
		tmp = Float64(Float64(Float64(-i) * j) * y);
	elseif (x <= 65000.0)
		tmp = Float64(Float64(-b) * Float64(c * z));
	elseif (x <= 5.6e+42)
		tmp = Float64(Float64(c * j) * t);
	else
		tmp = Float64(Float64(Float64(-a) * x) * t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if (x <= -6.5e+103)
		tmp = (z * y) * x;
	elseif (x <= 5.5e-304)
		tmp = (-i * j) * y;
	elseif (x <= 65000.0)
		tmp = -b * (c * z);
	elseif (x <= 5.6e+42)
		tmp = (c * j) * t;
	else
		tmp = (-a * x) * t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -6.5e+103], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, 5.5e-304], N[(N[((-i) * j), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[x, 65000.0], N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.6e+42], N[(N[(c * j), $MachinePrecision] * t), $MachinePrecision], N[(N[((-a) * x), $MachinePrecision] * t), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{+103}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\

\mathbf{elif}\;x \leq 5.5 \cdot 10^{-304}:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\

\mathbf{elif}\;x \leq 65000:\\
\;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\

\mathbf{elif}\;x \leq 5.6 \cdot 10^{+42}:\\
\;\;\;\;\left(c \cdot j\right) \cdot t\\

\mathbf{else}:\\
\;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -6.50000000000000001e103

    1. Initial program 73.6%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in 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. lower--.f64N/A

        \[\leadsto \left(c \cdot \left(j \cdot t\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - \color{blue}{b \cdot \left(c \cdot z\right)} \]
      2. +-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) \]
      3. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - a \cdot t\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - t \cdot a\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - \color{blue}{b} \cdot \left(c \cdot z\right) \]
      6. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      12. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
      17. lower-*.f6471.1

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
    4. Applied rewrites71.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z} \]
    5. Taylor expanded in y 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. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6438.8

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    7. Applied rewrites38.8%

      \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{x} \]

    if -6.50000000000000001e103 < x < 5.50000000000000035e-304

    1. Initial program 75.1%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in y around inf

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(i \cdot j\right) + x \cdot z\right) \cdot \color{blue}{y} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j + x \cdot z\right) \cdot y \]
      4. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(-1 \cdot i, j, x \cdot z\right) \cdot y \]
      5. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), j, x \cdot z\right) \cdot y \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-i, j, x \cdot z\right) \cdot y \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
      8. lower-*.f6433.2

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    4. Applied rewrites33.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y} \]
    5. Taylor expanded in x around 0

      \[\leadsto \left(-1 \cdot \left(i \cdot j\right)\right) \cdot y \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j\right) \cdot y \]
      2. lower-*.f64N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot j\right) \cdot y \]
      3. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      4. lift-neg.f6423.4

        \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]
    7. Applied rewrites23.4%

      \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]

    if 5.50000000000000035e-304 < x < 65000

    1. Initial program 73.2%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in 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. lower--.f64N/A

        \[\leadsto \left(c \cdot \left(j \cdot t\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - \color{blue}{b \cdot \left(c \cdot z\right)} \]
      2. +-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) \]
      3. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - a \cdot t\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - t \cdot a\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - \color{blue}{b} \cdot \left(c \cdot z\right) \]
      6. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      12. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
      17. lower-*.f6449.5

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
    4. Applied rewrites49.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z} \]
    5. Taylor expanded in b around inf

      \[\leadsto -1 \cdot \color{blue}{\left(b \cdot \left(c \cdot z\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot b\right) \cdot \left(c \cdot \color{blue}{z}\right) \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot z\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(b\right)\right) \cdot \left(c \cdot \color{blue}{z}\right) \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-b\right) \cdot \left(c \cdot z\right) \]
      5. lift-*.f6427.2

        \[\leadsto \left(-b\right) \cdot \left(c \cdot z\right) \]
    7. Applied rewrites27.2%

      \[\leadsto \left(-b\right) \cdot \color{blue}{\left(c \cdot z\right)} \]

    if 65000 < x < 5.5999999999999999e42

    1. Initial program 80.6%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6443.4

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    4. Applied rewrites43.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]
    5. Taylor expanded in x around 0

      \[\leadsto \left(c \cdot j\right) \cdot t \]
    6. Step-by-step derivation
      1. lower-*.f6423.0

        \[\leadsto \left(c \cdot j\right) \cdot t \]
    7. Applied rewrites23.0%

      \[\leadsto \left(c \cdot j\right) \cdot t \]

    if 5.5999999999999999e42 < x

    1. Initial program 73.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6445.6

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    4. Applied rewrites45.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]
    5. Taylor expanded in x around inf

      \[\leadsto \left(-1 \cdot \left(a \cdot x\right)\right) \cdot t \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a \cdot x\right)\right) \cdot t \]
      2. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x\right) \cdot t \]
      3. lift-neg.f64N/A

        \[\leadsto \left(\left(-a\right) \cdot x\right) \cdot t \]
      4. lower-*.f6435.4

        \[\leadsto \left(\left(-a\right) \cdot x\right) \cdot t \]
    7. Applied rewrites35.4%

      \[\leadsto \left(\left(-a\right) \cdot x\right) \cdot t \]
  3. Recombined 5 regimes into one program.
  4. Add Preprocessing

Alternative 22: 29.8% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot y\right) \cdot x\\ \mathbf{if}\;z \leq -7.2 \cdot 10^{+90}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -8 \cdot 10^{-129}:\\ \;\;\;\;\left(i \cdot b\right) \cdot a\\ \mathbf{elif}\;z \leq -6.9 \cdot 10^{-233}:\\ \;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-67}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* z y) x)))
   (if (<= z -7.2e+90)
     t_1
     (if (<= z -8e-129)
       (* (* i b) a)
       (if (<= z -6.9e-233)
         (* (* (- a) x) t)
         (if (<= z 1.12e-67) (* (* j t) c) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (z * y) * x;
	double tmp;
	if (z <= -7.2e+90) {
		tmp = t_1;
	} else if (z <= -8e-129) {
		tmp = (i * b) * a;
	} else if (z <= -6.9e-233) {
		tmp = (-a * x) * t;
	} else if (z <= 1.12e-67) {
		tmp = (j * t) * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z * y) * x
    if (z <= (-7.2d+90)) then
        tmp = t_1
    else if (z <= (-8d-129)) then
        tmp = (i * b) * a
    else if (z <= (-6.9d-233)) then
        tmp = (-a * x) * t
    else if (z <= 1.12d-67) then
        tmp = (j * t) * c
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (z * y) * x;
	double tmp;
	if (z <= -7.2e+90) {
		tmp = t_1;
	} else if (z <= -8e-129) {
		tmp = (i * b) * a;
	} else if (z <= -6.9e-233) {
		tmp = (-a * x) * t;
	} else if (z <= 1.12e-67) {
		tmp = (j * t) * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (z * y) * x
	tmp = 0
	if z <= -7.2e+90:
		tmp = t_1
	elif z <= -8e-129:
		tmp = (i * b) * a
	elif z <= -6.9e-233:
		tmp = (-a * x) * t
	elif z <= 1.12e-67:
		tmp = (j * t) * c
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(z * y) * x)
	tmp = 0.0
	if (z <= -7.2e+90)
		tmp = t_1;
	elseif (z <= -8e-129)
		tmp = Float64(Float64(i * b) * a);
	elseif (z <= -6.9e-233)
		tmp = Float64(Float64(Float64(-a) * x) * t);
	elseif (z <= 1.12e-67)
		tmp = Float64(Float64(j * t) * c);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (z * y) * x;
	tmp = 0.0;
	if (z <= -7.2e+90)
		tmp = t_1;
	elseif (z <= -8e-129)
		tmp = (i * b) * a;
	elseif (z <= -6.9e-233)
		tmp = (-a * x) * t;
	elseif (z <= 1.12e-67)
		tmp = (j * t) * c;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -7.2e+90], t$95$1, If[LessEqual[z, -8e-129], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, -6.9e-233], N[(N[((-a) * x), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 1.12e-67], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -8 \cdot 10^{-129}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\

\mathbf{elif}\;z \leq -6.9 \cdot 10^{-233}:\\
\;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\

\mathbf{elif}\;z \leq 1.12 \cdot 10^{-67}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.2e90 or 1.12e-67 < z

    1. Initial program 66.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 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. lower--.f64N/A

        \[\leadsto \left(c \cdot \left(j \cdot t\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - \color{blue}{b \cdot \left(c \cdot z\right)} \]
      2. +-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) \]
      3. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - a \cdot t\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - t \cdot a\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - \color{blue}{b} \cdot \left(c \cdot z\right) \]
      6. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      12. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
      17. lower-*.f6465.0

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
    4. Applied rewrites65.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z} \]
    5. Taylor expanded in y 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. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6434.4

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    7. Applied rewrites34.4%

      \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{x} \]

    if -7.2e90 < z < -7.9999999999999994e-129

    1. Initial program 78.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot y - a \cdot b\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot i\right) \cdot \color{blue}{\left(j \cdot y - a \cdot b\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot i\right) \cdot \color{blue}{\left(j \cdot y - a \cdot b\right)} \]
      3. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      5. lower--.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y - \color{blue}{a \cdot b}\right) \]
      6. lower-*.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y - \color{blue}{a} \cdot b\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y - b \cdot \color{blue}{a}\right) \]
      8. lower-*.f6439.7

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y - b \cdot \color{blue}{a}\right) \]
    4. Applied rewrites39.7%

      \[\leadsto \color{blue}{\left(-i\right) \cdot \left(j \cdot y - b \cdot a\right)} \]
    5. Taylor expanded in y around 0

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lower-*.f6423.3

        \[\leadsto \left(i \cdot b\right) \cdot a \]
    7. Applied rewrites23.3%

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]

    if -7.9999999999999994e-129 < z < -6.8999999999999997e-233

    1. Initial program 83.1%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    3. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right) \cdot \color{blue}{t} \]
      3. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot a\right) \cdot x + c \cdot j\right) \cdot t \]
      4. mul-1-negN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x + c \cdot j\right) \cdot t \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(a\right), x, c \cdot j\right) \cdot t \]
      6. lower-neg.f64N/A

        \[\leadsto \mathsf{fma}\left(-a, x, c \cdot j\right) \cdot t \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
      8. lower-*.f6445.6

        \[\leadsto \mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t \]
    4. Applied rewrites45.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t} \]
    5. Taylor expanded in x around inf

      \[\leadsto \left(-1 \cdot \left(a \cdot x\right)\right) \cdot t \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a \cdot x\right)\right) \cdot t \]
      2. distribute-lft-neg-outN/A

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot x\right) \cdot t \]
      3. lift-neg.f64N/A

        \[\leadsto \left(\left(-a\right) \cdot x\right) \cdot t \]
      4. lower-*.f6422.8

        \[\leadsto \left(\left(-a\right) \cdot x\right) \cdot t \]
    7. Applied rewrites22.8%

      \[\leadsto \left(\left(-a\right) \cdot x\right) \cdot t \]

    if -6.8999999999999997e-233 < z < 1.12e-67

    1. Initial program 82.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 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. lower--.f64N/A

        \[\leadsto \left(c \cdot \left(j \cdot t\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - \color{blue}{b \cdot \left(c \cdot z\right)} \]
      2. +-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) \]
      3. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - a \cdot t\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - t \cdot a\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - \color{blue}{b} \cdot \left(c \cdot z\right) \]
      6. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      12. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
      17. lower-*.f6449.8

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
    4. Applied rewrites49.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z} \]
    5. Taylor expanded in j around inf

      \[\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. lift-*.f64N/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      3. lift-*.f6427.3

        \[\leadsto \left(j \cdot t\right) \cdot c \]
    7. Applied rewrites27.3%

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 23: 29.6% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot y\right) \cdot x\\ \mathbf{if}\;z \leq -7.2 \cdot 10^{+90}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-129}:\\ \;\;\;\;\left(i \cdot b\right) \cdot a\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-233}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-67}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* z y) x)))
   (if (<= z -7.2e+90)
     t_1
     (if (<= z -3.4e-129)
       (* (* i b) a)
       (if (<= z -7e-233)
         (* (- a) (* t x))
         (if (<= z 1.12e-67) (* (* j t) c) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (z * y) * x;
	double tmp;
	if (z <= -7.2e+90) {
		tmp = t_1;
	} else if (z <= -3.4e-129) {
		tmp = (i * b) * a;
	} else if (z <= -7e-233) {
		tmp = -a * (t * x);
	} else if (z <= 1.12e-67) {
		tmp = (j * t) * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z * y) * x
    if (z <= (-7.2d+90)) then
        tmp = t_1
    else if (z <= (-3.4d-129)) then
        tmp = (i * b) * a
    else if (z <= (-7d-233)) then
        tmp = -a * (t * x)
    else if (z <= 1.12d-67) then
        tmp = (j * t) * c
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (z * y) * x;
	double tmp;
	if (z <= -7.2e+90) {
		tmp = t_1;
	} else if (z <= -3.4e-129) {
		tmp = (i * b) * a;
	} else if (z <= -7e-233) {
		tmp = -a * (t * x);
	} else if (z <= 1.12e-67) {
		tmp = (j * t) * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (z * y) * x
	tmp = 0
	if z <= -7.2e+90:
		tmp = t_1
	elif z <= -3.4e-129:
		tmp = (i * b) * a
	elif z <= -7e-233:
		tmp = -a * (t * x)
	elif z <= 1.12e-67:
		tmp = (j * t) * c
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(z * y) * x)
	tmp = 0.0
	if (z <= -7.2e+90)
		tmp = t_1;
	elseif (z <= -3.4e-129)
		tmp = Float64(Float64(i * b) * a);
	elseif (z <= -7e-233)
		tmp = Float64(Float64(-a) * Float64(t * x));
	elseif (z <= 1.12e-67)
		tmp = Float64(Float64(j * t) * c);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (z * y) * x;
	tmp = 0.0;
	if (z <= -7.2e+90)
		tmp = t_1;
	elseif (z <= -3.4e-129)
		tmp = (i * b) * a;
	elseif (z <= -7e-233)
		tmp = -a * (t * x);
	elseif (z <= 1.12e-67)
		tmp = (j * t) * c;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -7.2e+90], t$95$1, If[LessEqual[z, -3.4e-129], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, -7e-233], N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.12e-67], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -3.4 \cdot 10^{-129}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\

\mathbf{elif}\;z \leq -7 \cdot 10^{-233}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\

\mathbf{elif}\;z \leq 1.12 \cdot 10^{-67}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -7.2e90 or 1.12e-67 < z

    1. Initial program 66.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 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. lower--.f64N/A

        \[\leadsto \left(c \cdot \left(j \cdot t\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - \color{blue}{b \cdot \left(c \cdot z\right)} \]
      2. +-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) \]
      3. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - a \cdot t\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - t \cdot a\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - \color{blue}{b} \cdot \left(c \cdot z\right) \]
      6. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      12. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
      17. lower-*.f6465.0

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
    4. Applied rewrites65.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z} \]
    5. Taylor expanded in y 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. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6434.4

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    7. Applied rewrites34.4%

      \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{x} \]

    if -7.2e90 < z < -3.40000000000000013e-129

    1. Initial program 78.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot y - a \cdot b\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot i\right) \cdot \color{blue}{\left(j \cdot y - a \cdot b\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot i\right) \cdot \color{blue}{\left(j \cdot y - a \cdot b\right)} \]
      3. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      5. lower--.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y - \color{blue}{a \cdot b}\right) \]
      6. lower-*.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y - \color{blue}{a} \cdot b\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y - b \cdot \color{blue}{a}\right) \]
      8. lower-*.f6439.7

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y - b \cdot \color{blue}{a}\right) \]
    4. Applied rewrites39.7%

      \[\leadsto \color{blue}{\left(-i\right) \cdot \left(j \cdot y - b \cdot a\right)} \]
    5. Taylor expanded in y around 0

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lower-*.f6423.3

        \[\leadsto \left(i \cdot b\right) \cdot a \]
    7. Applied rewrites23.3%

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]

    if -3.40000000000000013e-129 < z < -6.99999999999999982e-233

    1. Initial program 83.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 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. lower--.f64N/A

        \[\leadsto \left(c \cdot \left(j \cdot t\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - \color{blue}{b \cdot \left(c \cdot z\right)} \]
      2. +-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) \]
      3. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - a \cdot t\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - t \cdot a\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - \color{blue}{b} \cdot \left(c \cdot z\right) \]
      6. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      12. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
      17. lower-*.f6452.1

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
    4. Applied rewrites52.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z} \]
    5. Taylor expanded in a around inf

      \[\leadsto -1 \cdot \color{blue}{\left(a \cdot \left(t \cdot x\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot a\right) \cdot \left(t \cdot \color{blue}{x}\right) \]
      2. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(t \cdot x\right) \]
      3. lower-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(a\right)\right) \cdot \left(t \cdot \color{blue}{x}\right) \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) \]
      5. lower-*.f6424.8

        \[\leadsto \left(-a\right) \cdot \left(t \cdot x\right) \]
    7. Applied rewrites24.8%

      \[\leadsto \left(-a\right) \cdot \color{blue}{\left(t \cdot x\right)} \]

    if -6.99999999999999982e-233 < z < 1.12e-67

    1. Initial program 82.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 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. lower--.f64N/A

        \[\leadsto \left(c \cdot \left(j \cdot t\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - \color{blue}{b \cdot \left(c \cdot z\right)} \]
      2. +-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) \]
      3. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - a \cdot t\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - t \cdot a\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - \color{blue}{b} \cdot \left(c \cdot z\right) \]
      6. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      12. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
      17. lower-*.f6449.8

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
    4. Applied rewrites49.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z} \]
    5. Taylor expanded in j around inf

      \[\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. lift-*.f64N/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      3. lift-*.f6427.3

        \[\leadsto \left(j \cdot t\right) \cdot c \]
    7. Applied rewrites27.3%

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]
  3. Recombined 4 regimes into one program.
  4. Add Preprocessing

Alternative 24: 29.5% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(z \cdot y\right) \cdot x\\ \mathbf{if}\;z \leq -1.05 \cdot 10^{+90}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-67}:\\ \;\;\;\;\left(j \cdot t\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* z y) x)))
   (if (<= z -1.05e+90) t_1 (if (<= z 1.12e-67) (* (* j t) c) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (z * y) * x;
	double tmp;
	if (z <= -1.05e+90) {
		tmp = t_1;
	} else if (z <= 1.12e-67) {
		tmp = (j * t) * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z * y) * x
    if (z <= (-1.05d+90)) then
        tmp = t_1
    else if (z <= 1.12d-67) then
        tmp = (j * t) * c
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (z * y) * x;
	double tmp;
	if (z <= -1.05e+90) {
		tmp = t_1;
	} else if (z <= 1.12e-67) {
		tmp = (j * t) * c;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = (z * y) * x
	tmp = 0
	if z <= -1.05e+90:
		tmp = t_1
	elif z <= 1.12e-67:
		tmp = (j * t) * c
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(z * y) * x)
	tmp = 0.0
	if (z <= -1.05e+90)
		tmp = t_1;
	elseif (z <= 1.12e-67)
		tmp = Float64(Float64(j * t) * c);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (z * y) * x;
	tmp = 0.0;
	if (z <= -1.05e+90)
		tmp = t_1;
	elseif (z <= 1.12e-67)
		tmp = (j * t) * c;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -1.05e+90], t$95$1, If[LessEqual[z, 1.12e-67], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.12 \cdot 10^{-67}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.0499999999999999e90 or 1.12e-67 < z

    1. Initial program 66.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 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. lower--.f64N/A

        \[\leadsto \left(c \cdot \left(j \cdot t\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - \color{blue}{b \cdot \left(c \cdot z\right)} \]
      2. +-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) \]
      3. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - a \cdot t\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - t \cdot a\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - \color{blue}{b} \cdot \left(c \cdot z\right) \]
      6. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      12. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
      17. lower-*.f6465.0

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
    4. Applied rewrites65.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z} \]
    5. Taylor expanded in y 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. *-commutativeN/A

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6434.4

        \[\leadsto \left(z \cdot y\right) \cdot x \]
    7. Applied rewrites34.4%

      \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{x} \]

    if -1.0499999999999999e90 < z < 1.12e-67

    1. Initial program 81.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in 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. lower--.f64N/A

        \[\leadsto \left(c \cdot \left(j \cdot t\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - \color{blue}{b \cdot \left(c \cdot z\right)} \]
      2. +-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) \]
      3. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - a \cdot t\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - t \cdot a\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - \color{blue}{b} \cdot \left(c \cdot z\right) \]
      6. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      12. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
      17. lower-*.f6453.8

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
    4. Applied rewrites53.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z} \]
    5. Taylor expanded in j around inf

      \[\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. lift-*.f64N/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      3. lift-*.f6425.7

        \[\leadsto \left(j \cdot t\right) \cdot c \]
    7. Applied rewrites25.7%

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 25: 28.9% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(j \cdot t\right) \cdot c\\ \mathbf{if}\;j \leq -1.42 \cdot 10^{-24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;j \leq 3.5 \cdot 10^{+133}:\\ \;\;\;\;\left(i \cdot b\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* (* j t) c)))
   (if (<= j -1.42e-24) t_1 (if (<= j 3.5e+133) (* (* i b) a) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (j * t) * c;
	double tmp;
	if (j <= -1.42e-24) {
		tmp = t_1;
	} else if (j <= 3.5e+133) {
		tmp = (i * b) * a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (j * t) * c
    if (j <= (-1.42d-24)) then
        tmp = t_1
    else if (j <= 3.5d+133) then
        tmp = (i * b) * a
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (j * t) * c;
	double tmp;
	if (j <= -1.42e-24) {
		tmp = t_1;
	} else if (j <= 3.5e+133) {
		tmp = (i * b) * a;
	} 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 j <= -1.42e-24:
		tmp = t_1
	elif j <= 3.5e+133:
		tmp = (i * b) * a
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(j * t) * c)
	tmp = 0.0
	if (j <= -1.42e-24)
		tmp = t_1;
	elseif (j <= 3.5e+133)
		tmp = Float64(Float64(i * b) * a);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = (j * t) * c;
	tmp = 0.0;
	if (j <= -1.42e-24)
		tmp = t_1;
	elseif (j <= 3.5e+133)
		tmp = (i * b) * a;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[j, -1.42e-24], t$95$1, If[LessEqual[j, 3.5e+133], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(j \cdot t\right) \cdot c\\
\mathbf{if}\;j \leq -1.42 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;j \leq 3.5 \cdot 10^{+133}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -1.42e-24 or 3.4999999999999998e133 < 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 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. lower--.f64N/A

        \[\leadsto \left(c \cdot \left(j \cdot t\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - \color{blue}{b \cdot \left(c \cdot z\right)} \]
      2. +-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) \]
      3. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - a \cdot t\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      4. *-commutativeN/A

        \[\leadsto \left(\left(y \cdot z - t \cdot a\right) \cdot x + c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - \color{blue}{b} \cdot \left(c \cdot z\right) \]
      6. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(y \cdot z - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      8. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - t \cdot a, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, c \cdot \left(j \cdot t\right)\right) - b \cdot \left(c \cdot z\right) \]
      11. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      12. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      13. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - b \cdot \left(c \cdot z\right) \]
      14. associate-*r*N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      15. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(b \cdot c\right) \cdot \color{blue}{z} \]
      16. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
      17. lower-*.f6453.9

        \[\leadsto \mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z \]
    4. Applied rewrites53.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot y - a \cdot t, x, \left(j \cdot t\right) \cdot c\right) - \left(c \cdot b\right) \cdot z} \]
    5. Taylor expanded in j around inf

      \[\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. lift-*.f64N/A

        \[\leadsto \left(j \cdot t\right) \cdot c \]
      3. lift-*.f6434.9

        \[\leadsto \left(j \cdot t\right) \cdot c \]
    7. Applied rewrites34.9%

      \[\leadsto \left(j \cdot t\right) \cdot \color{blue}{c} \]

    if -1.42e-24 < j < 3.4999999999999998e133

    1. Initial program 73.9%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
    2. Taylor expanded in i around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot y - a \cdot b\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(-1 \cdot i\right) \cdot \color{blue}{\left(j \cdot y - a \cdot b\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \left(-1 \cdot i\right) \cdot \color{blue}{\left(j \cdot y - a \cdot b\right)} \]
      3. mul-1-negN/A

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      4. lower-neg.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
      5. lower--.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y - \color{blue}{a \cdot b}\right) \]
      6. lower-*.f64N/A

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y - \color{blue}{a} \cdot b\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y - b \cdot \color{blue}{a}\right) \]
      8. lower-*.f6433.5

        \[\leadsto \left(-i\right) \cdot \left(j \cdot y - b \cdot \color{blue}{a}\right) \]
    4. Applied rewrites33.5%

      \[\leadsto \color{blue}{\left(-i\right) \cdot \left(j \cdot y - b \cdot a\right)} \]
    5. Taylor expanded in y around 0

      \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
    6. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      2. lower-*.f64N/A

        \[\leadsto \left(b \cdot i\right) \cdot a \]
      3. *-commutativeN/A

        \[\leadsto \left(i \cdot b\right) \cdot a \]
      4. lower-*.f6424.7

        \[\leadsto \left(i \cdot b\right) \cdot a \]
    7. Applied rewrites24.7%

      \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 26: 22.8% accurate, 5.9× speedup?

\[\begin{array}{l} \\ \left(i \cdot b\right) \cdot a \end{array} \]
(FPCore (x y z t a b c i j) :precision binary64 (* (* i b) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return (i * b) * a;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    code = (i * b) * a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	return (i * b) * a;
}
def code(x, y, z, t, a, b, c, i, j):
	return (i * b) * a
function code(x, y, z, t, a, b, c, i, j)
	return Float64(Float64(i * b) * a)
end
function tmp = code(x, y, z, t, a, b, c, i, j)
	tmp = (i * b) * a;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision]
\begin{array}{l}

\\
\left(i \cdot b\right) \cdot a
\end{array}
Derivation
  1. Initial program 74.1%

    \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \]
  2. Taylor expanded in i around -inf

    \[\leadsto \color{blue}{-1 \cdot \left(i \cdot \left(j \cdot y - a \cdot b\right)\right)} \]
  3. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \left(-1 \cdot i\right) \cdot \color{blue}{\left(j \cdot y - a \cdot b\right)} \]
    2. lower-*.f64N/A

      \[\leadsto \left(-1 \cdot i\right) \cdot \color{blue}{\left(j \cdot y - a \cdot b\right)} \]
    3. mul-1-negN/A

      \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
    4. lower-neg.f64N/A

      \[\leadsto \left(-i\right) \cdot \left(\color{blue}{j \cdot y} - a \cdot b\right) \]
    5. lower--.f64N/A

      \[\leadsto \left(-i\right) \cdot \left(j \cdot y - \color{blue}{a \cdot b}\right) \]
    6. lower-*.f64N/A

      \[\leadsto \left(-i\right) \cdot \left(j \cdot y - \color{blue}{a} \cdot b\right) \]
    7. *-commutativeN/A

      \[\leadsto \left(-i\right) \cdot \left(j \cdot y - b \cdot \color{blue}{a}\right) \]
    8. lower-*.f6438.6

      \[\leadsto \left(-i\right) \cdot \left(j \cdot y - b \cdot \color{blue}{a}\right) \]
  4. Applied rewrites38.6%

    \[\leadsto \color{blue}{\left(-i\right) \cdot \left(j \cdot y - b \cdot a\right)} \]
  5. Taylor expanded in y around 0

    \[\leadsto a \cdot \color{blue}{\left(b \cdot i\right)} \]
  6. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \left(b \cdot i\right) \cdot a \]
    2. lower-*.f64N/A

      \[\leadsto \left(b \cdot i\right) \cdot a \]
    3. *-commutativeN/A

      \[\leadsto \left(i \cdot b\right) \cdot a \]
    4. lower-*.f6422.8

      \[\leadsto \left(i \cdot b\right) \cdot a \]
  7. Applied rewrites22.8%

    \[\leadsto \left(i \cdot b\right) \cdot \color{blue}{a} \]
  8. Add Preprocessing

Reproduce

?
herbie shell --seed 2025110 
(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)))))