Linear.Matrix:det33 from linear-1.19.1.3

Percentage Accurate: 73.0% → 81.4%
Time: 8.1s
Alternatives: 23
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}

Sampling outcomes in binary64 precision:

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

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

Initial Program: 73.0% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 81.4% accurate, 0.5× speedup?

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

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

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


\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 88.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. Add Preprocessing
    3. Taylor expanded in b around 0

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 66.9% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;j \leq -1.12 \cdot 10^{+94} \lor \neg \left(j \leq 0.00023\right):\\ \;\;\;\;\mathsf{fma}\left(-i, j \cdot y, t \cdot \mathsf{fma}\left(-a, x, c \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \mathsf{fma}\left(-a, i, c \cdot z\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (or (<= j -1.12e+94) (not (<= j 0.00023)))
   (fma (- i) (* j y) (* t (fma (- a) x (* c j))))
   (fma (fma (- a) t (* z y)) x (* (- b) (fma (- a) i (* c z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((j <= -1.12e+94) || !(j <= 0.00023)) {
		tmp = fma(-i, (j * y), (t * fma(-a, x, (c * j))));
	} else {
		tmp = fma(fma(-a, t, (z * y)), x, (-b * fma(-a, i, (c * z))));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if ((j <= -1.12e+94) || !(j <= 0.00023))
		tmp = fma(Float64(-i), Float64(j * y), Float64(t * fma(Float64(-a), x, Float64(c * j))));
	else
		tmp = fma(fma(Float64(-a), t, Float64(z * y)), x, Float64(Float64(-b) * fma(Float64(-a), i, Float64(c * z))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[j, -1.12e+94], N[Not[LessEqual[j, 0.00023]], $MachinePrecision]], N[((-i) * N[(j * y), $MachinePrecision] + N[(t * N[((-a) * x + N[(c * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x + N[((-b) * N[((-a) * i + N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;j \leq -1.12 \cdot 10^{+94} \lor \neg \left(j \leq 0.00023\right):\\
\;\;\;\;\mathsf{fma}\left(-i, j \cdot y, t \cdot \mathsf{fma}\left(-a, x, c \cdot j\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -1.11999999999999996e94 or 2.3000000000000001e-4 < j

    1. Initial program 67.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. Add Preprocessing
    3. Taylor expanded in c around 0

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

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), \color{blue}{j \cdot y}, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\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, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\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}, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\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, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
    5. Applied rewrites59.0%

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

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

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

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

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

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

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

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

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

    if -1.11999999999999996e94 < j < 2.3000000000000001e-4

    1. Initial program 70.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. Add Preprocessing
    3. 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)} \]
    4. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;j \leq -1.12 \cdot 10^{+94} \lor \neg \left(j \leq 0.00023\right):\\ \;\;\;\;\mathsf{fma}\left(-i, j \cdot y, t \cdot \mathsf{fma}\left(-a, x, c \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \mathsf{fma}\left(-a, i, c \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 63.1% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.0000000000000001e92 or 1.14999999999999992e62 < y

    1. Initial program 61.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. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000001e92 < y < 2.0999999999999999e-179

    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. Add Preprocessing
    3. Taylor expanded in c around 0

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

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), \color{blue}{j \cdot y}, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\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, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\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}, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\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, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
    5. Applied rewrites78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0999999999999999e-179 < y < 1.14999999999999992e62

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2 \cdot 10^{+92}:\\ \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{-179}:\\ \;\;\;\;\mathsf{fma}\left(c, \mathsf{fma}\left(-b, z, j \cdot t\right), x \cdot \mathsf{fma}\left(-a, t, y \cdot z\right)\right)\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+62}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right), b, \left(-a\right) \cdot \left(t \cdot x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 59.8% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -7.1 \cdot 10^{-16} \lor \neg \left(y \leq 1.15 \cdot 10^{+62}\right):\\ \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right), b, \left(-a\right) \cdot \left(t \cdot x\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (or (<= y -7.1e-16) (not (<= y 1.15e+62)))
   (* (fma (- i) j (* z x)) y)
   (fma (fma i a (* (- c) z)) b (* (- a) (* t x)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((y <= -7.1e-16) || !(y <= 1.15e+62)) {
		tmp = fma(-i, j, (z * x)) * y;
	} else {
		tmp = fma(fma(i, a, (-c * z)), b, (-a * (t * x)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if ((y <= -7.1e-16) || !(y <= 1.15e+62))
		tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y);
	else
		tmp = fma(fma(i, a, Float64(Float64(-c) * z)), b, Float64(Float64(-a) * Float64(t * x)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[y, -7.1e-16], N[Not[LessEqual[y, 1.15e+62]], $MachinePrecision]], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[(i * a + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b + N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.1 \cdot 10^{-16} \lor \neg \left(y \leq 1.15 \cdot 10^{+62}\right):\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.1e-16 or 1.14999999999999992e62 < y

    1. Initial program 60.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. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

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

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

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

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

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

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

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

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

    if -7.1e-16 < y < 1.14999999999999992e62

    1. Initial program 76.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. Add Preprocessing
    3. Taylor expanded in b around 0

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.1 \cdot 10^{-16} \lor \neg \left(y \leq 1.15 \cdot 10^{+62}\right):\\ \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right), b, \left(-a\right) \cdot \left(t \cdot x\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 60.5% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{+58} \lor \neg \left(t \leq 8 \cdot 10^{+64}\right):\\ \;\;\;\;\mathsf{fma}\left(-i, j \cdot y, t \cdot \mathsf{fma}\left(-a, x, c \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right), b, x \cdot \left(y \cdot z\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (or (<= t -2.1e+58) (not (<= t 8e+64)))
   (fma (- i) (* j y) (* t (fma (- a) x (* c j))))
   (fma (fma i a (* (- c) z)) b (* x (* y z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((t <= -2.1e+58) || !(t <= 8e+64)) {
		tmp = fma(-i, (j * y), (t * fma(-a, x, (c * j))));
	} else {
		tmp = fma(fma(i, a, (-c * z)), b, (x * (y * z)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if ((t <= -2.1e+58) || !(t <= 8e+64))
		tmp = fma(Float64(-i), Float64(j * y), Float64(t * fma(Float64(-a), x, Float64(c * j))));
	else
		tmp = fma(fma(i, a, Float64(Float64(-c) * z)), b, Float64(x * Float64(y * z)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[t, -2.1e+58], N[Not[LessEqual[t, 8e+64]], $MachinePrecision]], N[((-i) * N[(j * y), $MachinePrecision] + N[(t * N[((-a) * x + N[(c * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(i * a + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b + N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+58} \lor \neg \left(t \leq 8 \cdot 10^{+64}\right):\\
\;\;\;\;\mathsf{fma}\left(-i, j \cdot y, t \cdot \mathsf{fma}\left(-a, x, c \cdot j\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.10000000000000012e58 or 8.00000000000000017e64 < t

    1. Initial program 58.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. Add Preprocessing
    3. Taylor expanded in c around 0

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

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), \color{blue}{j \cdot y}, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\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, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\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}, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\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, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
    5. Applied rewrites63.3%

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

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

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

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

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

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

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

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

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

    if -2.10000000000000012e58 < t < 8.00000000000000017e64

    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. Add Preprocessing
    3. Taylor expanded in b around 0

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{+58} \lor \neg \left(t \leq 8 \cdot 10^{+64}\right):\\ \;\;\;\;\mathsf{fma}\left(-i, j \cdot y, t \cdot \mathsf{fma}\left(-a, x, c \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right), b, x \cdot \left(y \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 58.7% accurate, 1.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.84999999999999994e60

    1. Initial program 54.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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    4. 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-*.f6470.6

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

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

    if -1.84999999999999994e60 < t < 8.00000000000000017e64

    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. Add Preprocessing
    3. Taylor expanded in b around 0

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

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

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

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

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

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

    if 8.00000000000000017e64 < t

    1. Initial program 61.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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    4. 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-*.f6459.6

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

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

      \[\leadsto \left(-1 \cdot \left(a \cdot x\right)\right) \cdot t \]
    7. 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. lower-*.f64N/A

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

        \[\leadsto \left(\left(-a\right) \cdot x\right) \cdot t \]
    8. Applied rewrites40.3%

      \[\leadsto \left(\left(-a\right) \cdot x\right) \cdot t \]
    9. Taylor expanded in c around -inf

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(-c\right) \cdot \mathsf{fma}\left(a, \frac{x}{c}, \mathsf{neg}\left(j\right)\right)\right) \cdot t \]
      10. lower-neg.f6459.7

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

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

Alternative 7: 58.9% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.85 \cdot 10^{+60} \lor \neg \left(t \leq 8 \cdot 10^{+64}\right):\\ \;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right), b, x \cdot \left(y \cdot z\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (or (<= t -1.85e+60) (not (<= t 8e+64)))
   (* (fma (- a) x (* j c)) t)
   (fma (fma i a (* (- c) z)) b (* x (* y z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((t <= -1.85e+60) || !(t <= 8e+64)) {
		tmp = fma(-a, x, (j * c)) * t;
	} else {
		tmp = fma(fma(i, a, (-c * z)), b, (x * (y * z)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if ((t <= -1.85e+60) || !(t <= 8e+64))
		tmp = Float64(fma(Float64(-a), x, Float64(j * c)) * t);
	else
		tmp = fma(fma(i, a, Float64(Float64(-c) * z)), b, Float64(x * Float64(y * z)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[t, -1.85e+60], N[Not[LessEqual[t, 8e+64]], $MachinePrecision]], N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(N[(i * a + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b + N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{+60} \lor \neg \left(t \leq 8 \cdot 10^{+64}\right):\\
\;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.84999999999999994e60 or 8.00000000000000017e64 < t

    1. Initial program 58.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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    4. 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-*.f6464.4

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

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

    if -1.84999999999999994e60 < t < 8.00000000000000017e64

    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. Add Preprocessing
    3. Taylor expanded in b around 0

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.85 \cdot 10^{+60} \lor \neg \left(t \leq 8 \cdot 10^{+64}\right):\\ \;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right), b, x \cdot \left(y \cdot z\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 52.1% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -5.5 \cdot 10^{+94}:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\

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

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

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


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

    1. Initial program 51.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. Add Preprocessing
    3. Taylor expanded in c around inf

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

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

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

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

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

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

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

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

    if -5.4999999999999997e94 < c < -2.29999999999999985e-242

    1. Initial program 76.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. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

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

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

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

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

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

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

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

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

    if -2.29999999999999985e-242 < c < 2.70000000000000007e-24

    1. Initial program 75.3%

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

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot \left(t \cdot x - b \cdot i\right)\right)} \]
    4. 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. fp-cancel-sub-sign-invN/A

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

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

        \[\leadsto \left(-a\right) \cdot \mathsf{fma}\left(t, x, \left(\mathsf{neg}\left(b\right)\right) \cdot i\right) \]
      8. lower-neg.f6459.0

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

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

    if 2.70000000000000007e-24 < c

    1. Initial program 65.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. Add Preprocessing
    3. Taylor expanded in y around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-b, z, j \cdot t\right) \cdot c \]
      11. lift-*.f6464.2

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

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

Alternative 9: 43.5% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{+93}:\\ \;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\ \mathbf{elif}\;y \leq -0.000155 \lor \neg \left(y \leq 1.05 \cdot 10^{+49}\right):\\ \;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= y -6e+93)
   (* (* (- i) j) y)
   (if (or (<= y -0.000155) (not (<= y 1.05e+49)))
     (* (fma y x (* (- b) c)) z)
     (* (fma i a (* (- c) z)) b))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (y <= -6e+93) {
		tmp = (-i * j) * y;
	} else if ((y <= -0.000155) || !(y <= 1.05e+49)) {
		tmp = fma(y, x, (-b * c)) * z;
	} else {
		tmp = fma(i, a, (-c * z)) * b;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if (y <= -6e+93)
		tmp = Float64(Float64(Float64(-i) * j) * y);
	elseif ((y <= -0.000155) || !(y <= 1.05e+49))
		tmp = Float64(fma(y, x, Float64(Float64(-b) * c)) * z);
	else
		tmp = Float64(fma(i, a, Float64(Float64(-c) * z)) * b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -6e+93], N[(N[((-i) * j), $MachinePrecision] * y), $MachinePrecision], If[Or[LessEqual[y, -0.000155], N[Not[LessEqual[y, 1.05e+49]], $MachinePrecision]], N[(N[(y * x + N[((-b) * c), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[(i * a + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -0.000155 \lor \neg \left(y \leq 1.05 \cdot 10^{+49}\right):\\
\;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\

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


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

    1. Initial program 62.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. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(-1 \cdot \left(i \cdot j\right)\right) \cdot y \]
    7. Step-by-step derivation
      1. mul-1-negN/A

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      4. lift-neg.f6456.1

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

      \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]

    if -5.99999999999999957e93 < y < -1.55e-4 or 1.05000000000000005e49 < y

    1. Initial program 60.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. Add Preprocessing
    3. Taylor expanded in z around inf

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

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

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

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

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

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

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

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

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

    if -1.55e-4 < y < 1.05000000000000005e49

    1. Initial program 75.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. Add Preprocessing
    3. Taylor expanded in b around inf

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification56.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{+93}:\\ \;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\ \mathbf{elif}\;y \leq -0.000155 \lor \neg \left(y \leq 1.05 \cdot 10^{+49}\right):\\ \;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 41.8% accurate, 1.6× speedup?

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

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

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

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

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


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

    1. Initial program 62.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. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(-1 \cdot \left(i \cdot j\right)\right) \cdot y \]
    7. Step-by-step derivation
      1. mul-1-negN/A

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      4. lift-neg.f6456.1

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

      \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]

    if -1.5500000000000001e95 < y < 2.8000000000000001e-299

    1. Initial program 68.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. Add Preprocessing
    3. Taylor expanded in c around inf

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

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

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

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

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

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

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

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

    if 2.8000000000000001e-299 < y < 1.24999999999999991e74

    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. Add Preprocessing
    3. Taylor expanded in b around inf

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

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

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

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

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

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

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

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

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

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

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

    if 1.24999999999999991e74 < y

    1. Initial program 58.4%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), \color{blue}{j \cdot y}, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\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, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\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}, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\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, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
    5. Applied rewrites58.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x \cdot \left(y \cdot \color{blue}{z}\right) \]
    10. 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. lower-*.f6447.6

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

      \[\leadsto \left(z \cdot y\right) \cdot x \]
  3. Recombined 4 regimes into one program.
  4. Final simplification54.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{+95}:\\ \;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{-299}:\\ \;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\ \mathbf{elif}\;y \leq 1.25 \cdot 10^{+74}:\\ \;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 29.4% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5 \cdot 10^{+20}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-49}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-239}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{+74}:\\ \;\;\;\;\left(a \cdot i\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (<= y -5e+20)
   (* (* z x) y)
   (if (<= y -5.2e-49)
     (* (* b a) i)
     (if (<= y 1.8e-239)
       (* (- a) (* t x))
       (if (<= y 1.05e+74) (* (* a i) b) (* (* z y) x))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if (y <= -5e+20) {
		tmp = (z * x) * y;
	} else if (y <= -5.2e-49) {
		tmp = (b * a) * i;
	} else if (y <= 1.8e-239) {
		tmp = -a * (t * x);
	} else if (y <= 1.05e+74) {
		tmp = (a * i) * b;
	} else {
		tmp = (z * y) * x;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+20}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\

\mathbf{elif}\;y \leq -5.2 \cdot 10^{-49}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\

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

\mathbf{elif}\;y \leq 1.05 \cdot 10^{+74}:\\
\;\;\;\;\left(a \cdot i\right) \cdot b\\

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


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

    1. Initial program 63.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. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5e20 < y < -5.1999999999999999e-49

    1. Initial program 57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.1999999999999999e-49 < y < 1.8000000000000001e-239

    1. Initial program 74.2%

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

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    4. 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-*.f6453.1

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

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

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

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

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

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

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

      \[\leadsto -a \cdot \left(t \cdot x\right) \]

    if 1.8000000000000001e-239 < y < 1.0499999999999999e74

    1. Initial program 78.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. Add Preprocessing
    3. Taylor expanded in b around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0499999999999999e74 < y

    1. Initial program 58.4%

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), \color{blue}{j \cdot y}, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\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, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\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}, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\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, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
    5. Applied rewrites58.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x \cdot \left(y \cdot \color{blue}{z}\right) \]
    10. 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. lower-*.f6447.6

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

      \[\leadsto \left(z \cdot y\right) \cdot x \]
  3. Recombined 5 regimes into one program.
  4. Final simplification38.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5 \cdot 10^{+20}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-49}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-239}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{+74}:\\ \;\;\;\;\left(a \cdot i\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 52.6% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{+21} \lor \neg \left(y \leq 9.8 \cdot 10^{+43}\right):\\ \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (or (<= y -4.8e+21) (not (<= y 9.8e+43)))
   (* (fma (- i) j (* z x)) y)
   (* (fma i a (* (- c) z)) b)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((y <= -4.8e+21) || !(y <= 9.8e+43)) {
		tmp = fma(-i, j, (z * x)) * y;
	} else {
		tmp = fma(i, a, (-c * z)) * b;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if ((y <= -4.8e+21) || !(y <= 9.8e+43))
		tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y);
	else
		tmp = Float64(fma(i, a, Float64(Float64(-c) * z)) * b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[y, -4.8e+21], N[Not[LessEqual[y, 9.8e+43]], $MachinePrecision]], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[(i * a + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+21} \lor \neg \left(y \leq 9.8 \cdot 10^{+43}\right):\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.8e21 or 9.7999999999999999e43 < y

    1. Initial program 62.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. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

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

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

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

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

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

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

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

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

    if -4.8e21 < y < 9.7999999999999999e43

    1. Initial program 74.3%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification61.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.8 \cdot 10^{+21} \lor \neg \left(y \leq 9.8 \cdot 10^{+43}\right):\\ \;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 51.2% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{+59} \lor \neg \left(t \leq 75000000000000\right):\\ \;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (or (<= t -6e+59) (not (<= t 75000000000000.0)))
   (* (fma (- a) x (* j c)) t)
   (* (fma y x (* (- b) c)) z)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((t <= -6e+59) || !(t <= 75000000000000.0)) {
		tmp = fma(-a, x, (j * c)) * t;
	} else {
		tmp = fma(y, x, (-b * c)) * z;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if ((t <= -6e+59) || !(t <= 75000000000000.0))
		tmp = Float64(fma(Float64(-a), x, Float64(j * c)) * t);
	else
		tmp = Float64(fma(y, x, Float64(Float64(-b) * c)) * z);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[t, -6e+59], N[Not[LessEqual[t, 75000000000000.0]], $MachinePrecision]], N[(N[((-a) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(N[(y * x + N[((-b) * c), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.0000000000000001e59 or 7.5e13 < t

    1. Initial program 59.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. Add Preprocessing
    3. Taylor expanded in t around inf

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

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

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

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

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

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

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

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

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

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

    if -6.0000000000000001e59 < t < 7.5e13

    1. Initial program 77.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. Add Preprocessing
    3. Taylor expanded in z around inf

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{+59} \lor \neg \left(t \leq 75000000000000\right):\\ \;\;\;\;\mathsf{fma}\left(-a, x, j \cdot c\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 30.2% accurate, 2.0× speedup?

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

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

\mathbf{elif}\;c \leq -4.2 \cdot 10^{-246}:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -5.8000000000000003e34 or 2.99999999999999995e-24 < c

    1. Initial program 60.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. Add Preprocessing
    3. Taylor expanded in b around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      4. lift-neg.f6451.2

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

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

    if -5.8000000000000003e34 < c < -4.19999999999999989e-246

    1. Initial program 77.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. Add Preprocessing
    3. Taylor expanded in y around inf

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(-1 \cdot \left(i \cdot j\right)\right) \cdot y \]
    7. Step-by-step derivation
      1. mul-1-negN/A

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      4. lift-neg.f6436.6

        \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]
    8. Applied rewrites36.6%

      \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]

    if -4.19999999999999989e-246 < c < 2.99999999999999995e-24

    1. Initial program 75.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(a \cdot i\right) \cdot b \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 15: 47.6% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.05 \cdot 10^{+124}:\\
\;\;\;\;\mathsf{fma}\left(j, t, \left(-b\right) \cdot z\right) \cdot c\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -2.05000000000000001e124

    1. Initial program 47.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. Add Preprocessing
    3. Taylor expanded in c around inf

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

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

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

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

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

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

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

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

    if -2.05000000000000001e124 < c < 8.00000000000000047e-122

    1. Initial program 77.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. Add Preprocessing
    3. Taylor expanded in x around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.00000000000000047e-122 < c

    1. Initial program 67.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 27.4% accurate, 2.1× speedup?

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

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

\mathbf{elif}\;c \leq -3.1 \cdot 10^{-242}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\

\mathbf{elif}\;c \leq 8 \cdot 10^{+208}:\\
\;\;\;\;\left(a \cdot i\right) \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -6.80000000000000056e169 or 7.9999999999999999e208 < c

    1. Initial program 45.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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    4. 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-*.f6456.6

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

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

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

        \[\leadsto \left(c \cdot j\right) \cdot t \]
    8. Applied rewrites48.2%

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

    if -6.80000000000000056e169 < c < -3.10000000000000015e-242

    1. Initial program 77.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.10000000000000015e-242 < c < 7.9999999999999999e208

    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. Add Preprocessing
    3. Taylor expanded in b around inf

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a \cdot i\right) \cdot b \]
    8. Applied rewrites32.3%

      \[\leadsto \left(a \cdot i\right) \cdot b \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 17: 29.5% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{+100} \lor \neg \left(t \leq 4 \cdot 10^{+32}\right):\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-b\right) \cdot z\right) \cdot c\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (or (<= t -2.1e+100) (not (<= t 4e+32)))
   (* (- a) (* t x))
   (* (* (- b) z) c)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((t <= -2.1e+100) || !(t <= 4e+32)) {
		tmp = -a * (t * x);
	} else {
		tmp = (-b * z) * c;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if ((t <= (-2.1d+100)) .or. (.not. (t <= 4d+32))) then
        tmp = -a * (t * x)
    else
        tmp = (-b * z) * c
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((t <= -2.1e+100) || !(t <= 4e+32)) {
		tmp = -a * (t * x);
	} else {
		tmp = (-b * z) * c;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if (t <= -2.1e+100) or not (t <= 4e+32):
		tmp = -a * (t * x)
	else:
		tmp = (-b * z) * c
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if ((t <= -2.1e+100) || !(t <= 4e+32))
		tmp = Float64(Float64(-a) * Float64(t * x));
	else
		tmp = Float64(Float64(Float64(-b) * z) * c);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if ((t <= -2.1e+100) || ~((t <= 4e+32)))
		tmp = -a * (t * x);
	else
		tmp = (-b * z) * c;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[t, -2.1e+100], N[Not[LessEqual[t, 4e+32]], $MachinePrecision]], N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision], N[(N[((-b) * z), $MachinePrecision] * c), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+100} \lor \neg \left(t \leq 4 \cdot 10^{+32}\right):\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.0999999999999999e100 or 4.00000000000000021e32 < t

    1. Initial program 59.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. Add Preprocessing
    3. Taylor expanded in t around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -a \cdot \left(t \cdot x\right) \]
    8. Applied rewrites47.2%

      \[\leadsto -a \cdot \left(t \cdot x\right) \]

    if -2.0999999999999999e100 < t < 4.00000000000000021e32

    1. Initial program 76.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. Add Preprocessing
    3. Taylor expanded in y around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-b, z, j \cdot t\right) \cdot c \]
      11. lift-*.f6441.5

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

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

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(b\right)\right) \cdot z\right) \cdot c \]
      4. lift-neg.f6435.8

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

      \[\leadsto \left(\left(-b\right) \cdot z\right) \cdot c \]
  3. Recombined 2 regimes into one program.
  4. Final simplification40.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{+100} \lor \neg \left(t \leq 4 \cdot 10^{+32}\right):\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-b\right) \cdot z\right) \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 29.5% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{+100} \lor \neg \left(t \leq 4 \cdot 10^{+32}\right):\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (or (<= t -1.8e+100) (not (<= t 4e+32)))
   (* (- a) (* t x))
   (* (* (- c) z) b)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((t <= -1.8e+100) || !(t <= 4e+32)) {
		tmp = -a * (t * x);
	} else {
		tmp = (-c * z) * b;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if ((t <= (-1.8d+100)) .or. (.not. (t <= 4d+32))) then
        tmp = -a * (t * x)
    else
        tmp = (-c * z) * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((t <= -1.8e+100) || !(t <= 4e+32)) {
		tmp = -a * (t * x);
	} else {
		tmp = (-c * z) * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if (t <= -1.8e+100) or not (t <= 4e+32):
		tmp = -a * (t * x)
	else:
		tmp = (-c * z) * b
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if ((t <= -1.8e+100) || !(t <= 4e+32))
		tmp = Float64(Float64(-a) * Float64(t * x));
	else
		tmp = Float64(Float64(Float64(-c) * z) * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if ((t <= -1.8e+100) || ~((t <= 4e+32)))
		tmp = -a * (t * x);
	else
		tmp = (-c * z) * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[t, -1.8e+100], N[Not[LessEqual[t, 4e+32]], $MachinePrecision]], N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision], N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{+100} \lor \neg \left(t \leq 4 \cdot 10^{+32}\right):\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.8e100 or 4.00000000000000021e32 < t

    1. Initial program 59.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. Add Preprocessing
    3. Taylor expanded in t around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -a \cdot \left(t \cdot x\right) \]
    8. Applied rewrites47.2%

      \[\leadsto -a \cdot \left(t \cdot x\right) \]

    if -1.8e100 < t < 4.00000000000000021e32

    1. Initial program 76.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. Add Preprocessing
    3. Taylor expanded in b around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      4. lift-neg.f6435.3

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

      \[\leadsto \left(\left(-c\right) \cdot z\right) \cdot b \]
  3. Recombined 2 regimes into one program.
  4. Final simplification40.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.8 \cdot 10^{+100} \lor \neg \left(t \leq 4 \cdot 10^{+32}\right):\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 41.3% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;j \leq 2.7 \cdot 10^{+137}:\\
\;\;\;\;\mathsf{fma}\left(i, a, \left(-c\right) \cdot z\right) \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < 2.70000000000000017e137

    1. Initial program 69.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. Add Preprocessing
    3. Taylor expanded in b around inf

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

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

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

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

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

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

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

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

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

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

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

    if 2.70000000000000017e137 < j

    1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(-1 \cdot \left(i \cdot j\right)\right) \cdot y \]
    7. Step-by-step derivation
      1. mul-1-negN/A

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(i\right)\right) \cdot j\right) \cdot y \]
      4. lift-neg.f6455.8

        \[\leadsto \left(\left(-i\right) \cdot j\right) \cdot y \]
    8. Applied rewrites55.8%

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

Alternative 20: 29.9% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5 \cdot 10^{+20} \lor \neg \left(y \leq 1.05 \cdot 10^{+74}\right):\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (or (<= y -5e+20) (not (<= y 1.05e+74))) (* (* z y) x) (* (* b a) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((y <= -5e+20) || !(y <= 1.05e+74)) {
		tmp = (z * y) * x;
	} else {
		tmp = (b * a) * i;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if ((y <= (-5d+20)) .or. (.not. (y <= 1.05d+74))) then
        tmp = (z * y) * x
    else
        tmp = (b * a) * i
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((y <= -5e+20) || !(y <= 1.05e+74)) {
		tmp = (z * y) * x;
	} else {
		tmp = (b * a) * i;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if (y <= -5e+20) or not (y <= 1.05e+74):
		tmp = (z * y) * x
	else:
		tmp = (b * a) * i
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if ((y <= -5e+20) || !(y <= 1.05e+74))
		tmp = Float64(Float64(z * y) * x);
	else
		tmp = Float64(Float64(b * a) * i);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if ((y <= -5e+20) || ~((y <= 1.05e+74)))
		tmp = (z * y) * x;
	else
		tmp = (b * a) * i;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[y, -5e+20], N[Not[LessEqual[y, 1.05e+74]], $MachinePrecision]], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+20} \lor \neg \left(y \leq 1.05 \cdot 10^{+74}\right):\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\

\mathbf{else}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5e20 or 1.0499999999999999e74 < y

    1. Initial program 61.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. Add Preprocessing
    3. Taylor expanded in c around 0

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

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

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(i\right), \color{blue}{j \cdot y}, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\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, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\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}, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\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, \left(c \cdot \left(j \cdot t - b \cdot z\right) + x \cdot \left(y \cdot z - a \cdot t\right)\right) - -1 \cdot \left(a \cdot \left(b \cdot i\right)\right)\right) \]
    5. Applied rewrites64.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x \cdot \left(y \cdot \color{blue}{z}\right) \]
    10. 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. lower-*.f6441.2

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

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

    if -5e20 < y < 1.0499999999999999e74

    1. Initial program 74.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. Add Preprocessing
    3. Taylor expanded in b around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto a \cdot \left(b \cdot i\right) \]
    8. Applied rewrites25.3%

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

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

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

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

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

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

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

      \[\leadsto \left(b \cdot a\right) \cdot i \]
  3. Recombined 2 regimes into one program.
  4. Final simplification32.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5 \cdot 10^{+20} \lor \neg \left(y \leq 1.05 \cdot 10^{+74}\right):\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 29.1% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;i \leq -6 \cdot 10^{-23} \lor \neg \left(i \leq 1.32 \cdot 10^{+115}\right):\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(j \cdot t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (if (or (<= i -6e-23) (not (<= i 1.32e+115))) (* (* b a) i) (* c (* j t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((i <= -6e-23) || !(i <= 1.32e+115)) {
		tmp = (b * a) * i;
	} else {
		tmp = c * (j * t);
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: tmp
    if ((i <= (-6d-23)) .or. (.not. (i <= 1.32d+115))) then
        tmp = (b * a) * i
    else
        tmp = c * (j * t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double tmp;
	if ((i <= -6e-23) || !(i <= 1.32e+115)) {
		tmp = (b * a) * i;
	} else {
		tmp = c * (j * t);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	tmp = 0
	if (i <= -6e-23) or not (i <= 1.32e+115):
		tmp = (b * a) * i
	else:
		tmp = c * (j * t)
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0
	if ((i <= -6e-23) || !(i <= 1.32e+115))
		tmp = Float64(Float64(b * a) * i);
	else
		tmp = Float64(c * Float64(j * t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	tmp = 0.0;
	if ((i <= -6e-23) || ~((i <= 1.32e+115)))
		tmp = (b * a) * i;
	else
		tmp = c * (j * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[i, -6e-23], N[Not[LessEqual[i, 1.32e+115]], $MachinePrecision]], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], N[(c * N[(j * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;i \leq -6 \cdot 10^{-23} \lor \neg \left(i \leq 1.32 \cdot 10^{+115}\right):\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if i < -6.00000000000000006e-23 or 1.32e115 < i

    1. Initial program 56.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. Add Preprocessing
    3. Taylor expanded in b around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.00000000000000006e-23 < i < 1.32e115

    1. Initial program 77.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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \color{blue}{t \cdot \left(-1 \cdot \left(a \cdot x\right) + c \cdot j\right)} \]
    4. 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 \]
    5. Applied rewrites44.5%

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

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

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

        \[\leadsto c \cdot \left(j \cdot t\right) \]
    8. Applied rewrites22.8%

      \[\leadsto c \cdot \color{blue}{\left(j \cdot t\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification30.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -6 \cdot 10^{-23} \lor \neg \left(i \leq 1.32 \cdot 10^{+115}\right):\\ \;\;\;\;\left(b \cdot a\right) \cdot i\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(j \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 22.4% accurate, 5.5× speedup?

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

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

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

\\
\left(b \cdot a\right) \cdot i
\end{array}
Derivation
  1. Initial program 69.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. Add Preprocessing
  3. Taylor expanded in b around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto a \cdot \left(b \cdot i\right) \]
  8. Applied rewrites21.2%

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

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

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

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

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

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

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

    \[\leadsto \left(b \cdot a\right) \cdot i \]
  11. Add Preprocessing

Alternative 23: 22.1% accurate, 5.5× speedup?

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

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

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

\\
a \cdot \left(b \cdot i\right)
\end{array}
Derivation
  1. Initial program 69.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. Add Preprocessing
  3. Taylor expanded in b around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto a \cdot \left(b \cdot i\right) \]
  8. Applied rewrites21.2%

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

Developer Target 1: 68.3% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\ t_2 := x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\ \mathbf{if}\;t < -8.120978919195912 \cdot 10^{-33}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t < -4.712553818218485 \cdot 10^{-169}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t < -7.633533346031584 \cdot 10^{-308}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t < 1.0535888557455487 \cdot 10^{-139}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1
         (+
          (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
          (/
           (* j (- (pow (* c t) 2.0) (pow (* i y) 2.0)))
           (+ (* c t) (* i y)))))
        (t_2
         (-
          (* x (- (* z y) (* a t)))
          (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j)))))
   (if (< t -8.120978919195912e-33)
     t_2
     (if (< t -4.712553818218485e-169)
       t_1
       (if (< t -7.633533346031584e-308)
         t_2
         (if (< t 1.0535888557455487e-139) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (pow((c * t), 2.0) - pow((i * y), 2.0))) / ((c * t) + (i * y)));
	double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
	double tmp;
	if (t < -8.120978919195912e-33) {
		tmp = t_2;
	} else if (t < -4.712553818218485e-169) {
		tmp = t_1;
	} else if (t < -7.633533346031584e-308) {
		tmp = t_2;
	} else if (t < 1.0535888557455487e-139) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ** 2.0d0) - ((i * y) ** 2.0d0))) / ((c * t) + (i * y)))
    t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j))
    if (t < (-8.120978919195912d-33)) then
        tmp = t_2
    else if (t < (-4.712553818218485d-169)) then
        tmp = t_1
    else if (t < (-7.633533346031584d-308)) then
        tmp = t_2
    else if (t < 1.0535888557455487d-139) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (Math.pow((c * t), 2.0) - Math.pow((i * y), 2.0))) / ((c * t) + (i * y)));
	double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
	double tmp;
	if (t < -8.120978919195912e-33) {
		tmp = t_2;
	} else if (t < -4.712553818218485e-169) {
		tmp = t_1;
	} else if (t < -7.633533346031584e-308) {
		tmp = t_2;
	} else if (t < 1.0535888557455487e-139) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (math.pow((c * t), 2.0) - math.pow((i * y), 2.0))) / ((c * t) + (i * y)))
	t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j))
	tmp = 0
	if t < -8.120978919195912e-33:
		tmp = t_2
	elif t < -4.712553818218485e-169:
		tmp = t_1
	elif t < -7.633533346031584e-308:
		tmp = t_2
	elif t < 1.0535888557455487e-139:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(Float64(j * Float64((Float64(c * t) ^ 2.0) - (Float64(i * y) ^ 2.0))) / Float64(Float64(c * t) + Float64(i * y))))
	t_2 = Float64(Float64(x * Float64(Float64(z * y) - Float64(a * t))) - Float64(Float64(b * Float64(Float64(z * c) - Float64(a * i))) - Float64(Float64(Float64(c * t) - Float64(y * i)) * j)))
	tmp = 0.0
	if (t < -8.120978919195912e-33)
		tmp = t_2;
	elseif (t < -4.712553818218485e-169)
		tmp = t_1;
	elseif (t < -7.633533346031584e-308)
		tmp = t_2;
	elseif (t < 1.0535888557455487e-139)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j)
	t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ^ 2.0) - ((i * y) ^ 2.0))) / ((c * t) + (i * y)));
	t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
	tmp = 0.0;
	if (t < -8.120978919195912e-33)
		tmp = t_2;
	elseif (t < -4.712553818218485e-169)
		tmp = t_1;
	elseif (t < -7.633533346031584e-308)
		tmp = t_2;
	elseif (t < 1.0535888557455487e-139)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(j * N[(N[Power[N[(c * t), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(i * y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * t), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[(z * c), $MachinePrecision] - N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(c * t), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -8.120978919195912e-33], t$95$2, If[Less[t, -4.712553818218485e-169], t$95$1, If[Less[t, -7.633533346031584e-308], t$95$2, If[Less[t, 1.0535888557455487e-139], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\
t_2 := x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\
\mathbf{if}\;t < -8.120978919195912 \cdot 10^{-33}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t < -4.712553818218485 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t < -7.633533346031584 \cdot 10^{-308}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t < 1.0535888557455487 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2025051 
(FPCore (x y z t a b c i j)
  :name "Linear.Matrix:det33 from linear-1.19.1.3"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< t -1015122364899489/125000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t -942510763643697/2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (if (< t -238547917063487/3125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t 10535888557455487/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))))))))

  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))