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

Percentage Accurate: 73.1% → 82.3%
Time: 9.8s
Alternatives: 21
Speedup: 0.5×

Specification

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

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

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

\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\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 21 alternatives:

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

Initial Program: 73.1% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 82.3% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 91.4%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. Add Preprocessing

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \left(j \cdot y\right) + \left(\left(\left(\mathsf{neg}\left(t\right)\right) \cdot x + j \cdot c\right) \cdot a + \color{blue}{\left(z \cdot y\right)} \cdot x\right) \]
    8. Applied rewrites52.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 56.5% accurate, 1.0× speedup?

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

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

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

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

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

\mathbf{elif}\;x \leq 1.6 \cdot 10^{+205}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -2.24999999999999995e-33 or 1.06000000000000006e-17 < x < 1.59999999999999998e205

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.24999999999999995e-33 < x < -5.70000000000000015e-112

    1. Initial program 69.4%

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

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

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

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

        \[\leadsto \left(i \cdot t\right) \cdot b + j \cdot \left(c \cdot a - y \cdot i\right) \]
    5. Applied rewrites69.7%

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

    if -5.70000000000000015e-112 < x < 1.5000000000000001e-231

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(i, t, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      8. lower-neg.f6463.7

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

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

    if 1.5000000000000001e-231 < x < 1.06000000000000006e-17

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.59999999999999998e205 < x

    1. Initial program 54.3%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\right)\right) \]
    5. Applied rewrites77.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.25 \cdot 10^{-33}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, x, j \cdot c\right), a, \left(z \cdot y\right) \cdot x\right)\\ \mathbf{elif}\;x \leq -5.7 \cdot 10^{-112}:\\ \;\;\;\;\left(i \cdot t\right) \cdot b + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{-231}:\\ \;\;\;\;\mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b\\ \mathbf{elif}\;x \leq 1.06 \cdot 10^{-17}:\\ \;\;\;\;\mathsf{fma}\left(\left(-i\right) \cdot j, y, \mathsf{fma}\left(y \cdot x, z, \left(j \cdot c\right) \cdot a\right)\right)\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+205}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, x, j \cdot c\right), a, \left(z \cdot y\right) \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(i \cdot t\right) \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 55.2% accurate, 1.0× speedup?

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

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

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

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

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

\mathbf{elif}\;x \leq 1.6 \cdot 10^{+205}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -1.6500000000000001e-33 or 8.0000000000000006e-18 < x < 1.59999999999999998e205

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.6500000000000001e-33 < x < -1.01999999999999997e-63

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(\mathsf{neg}\left(b\right)\right) \cdot t\right) \]
      8. lower-neg.f6499.3

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(-b\right) \cdot t\right) \]
    5. Applied rewrites99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-b, t, j \cdot y\right) \cdot \left(\mathsf{neg}\left(i\right)\right) \]
      16. lift-neg.f6499.6

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

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

    if -1.01999999999999997e-63 < x < 2.90000000000000001e-198

    1. Initial program 70.6%

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

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

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

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

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

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

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

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

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

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

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

    if 2.90000000000000001e-198 < x < 8.0000000000000006e-18

    1. Initial program 76.3%

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

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

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

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

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

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

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

        \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j \]
      7. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \left(a \cdot c + \left(-1 \cdot i\right) \cdot y\right) \cdot j \]
      9. associate-*r*N/A

        \[\leadsto \left(a \cdot c + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      10. +-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot y\right) + a \cdot c\right) \cdot j \]
      11. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + a \cdot c\right) \cdot j \]
      12. mul-1-negN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j \]
      16. lift-*.f6464.7

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

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

    if 1.59999999999999998e205 < x

    1. Initial program 54.3%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\right)\right) \]
    5. Applied rewrites77.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.65 \cdot 10^{-33}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, x, j \cdot c\right), a, \left(z \cdot y\right) \cdot x\right)\\ \mathbf{elif}\;x \leq -1.02 \cdot 10^{-63}:\\ \;\;\;\;\mathsf{fma}\left(-b, t, j \cdot y\right) \cdot \left(-i\right)\\ \mathbf{elif}\;x \leq 2.9 \cdot 10^{-198}:\\ \;\;\;\;\mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b\\ \mathbf{elif}\;x \leq 8 \cdot 10^{-18}:\\ \;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+205}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, x, j \cdot c\right), a, \left(z \cdot y\right) \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(i \cdot t\right) \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 63.8% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.99999999999999958e-243 or 4.99999999999999977e36 < y

    1. Initial program 64.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.99999999999999958e-243 < y < 4.99999999999999977e36

    1. Initial program 83.8%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\right)\right) \]
    5. Applied rewrites76.2%

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

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

Alternative 5: 70.5% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;j \leq -2.65 \cdot 10^{-17} \lor \neg \left(j \leq 8.2 \cdot 10^{+21}\right):\\
\;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z + j \cdot \left(c \cdot a - y \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if j < -2.6499999999999999e-17 or 8.2e21 < j

    1. Initial program 69.6%

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

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

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

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

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

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

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

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

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

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

    if -2.6499999999999999e-17 < j < 8.2e21

    1. Initial program 72.3%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\right)\right) \]
    5. Applied rewrites73.9%

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

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

Alternative 6: 68.2% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if j < -6.50000000000000024e-7

    1. Initial program 70.4%

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

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

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

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

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

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

    if -6.50000000000000024e-7 < j < 1.5500000000000001e22

    1. Initial program 72.3%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\right)\right) \]
    5. Applied rewrites73.9%

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

    if 1.5500000000000001e22 < j

    1. Initial program 68.7%

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

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x + j \cdot \left(c \cdot a - y \cdot i\right) \]
      4. lower-*.f6472.5

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

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

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

Alternative 7: 59.5% accurate, 1.3× speedup?

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

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

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

\mathbf{elif}\;x \leq 1.6 \cdot 10^{+205}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.24999999999999995e-33 or 3.8999999999999999e-165 < x < 1.59999999999999998e205

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-t, x, j \cdot c\right) \cdot a + \left(z \cdot y\right) \cdot x \]
      12. lift-fma.f6470.6

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

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

    if -2.24999999999999995e-33 < x < 3.8999999999999999e-165

    1. Initial program 72.7%

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

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

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

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

        \[\leadsto \left(i \cdot t\right) \cdot b + j \cdot \left(c \cdot a - y \cdot i\right) \]
    5. Applied rewrites59.2%

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

    if 1.59999999999999998e205 < x

    1. Initial program 54.3%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\right)\right) \]
    5. Applied rewrites77.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.25 \cdot 10^{-33}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, x, j \cdot c\right), a, \left(z \cdot y\right) \cdot x\right)\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{-165}:\\ \;\;\;\;\left(i \cdot t\right) \cdot b + j \cdot \left(c \cdot a - y \cdot i\right)\\ \mathbf{elif}\;x \leq 1.6 \cdot 10^{+205}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, x, j \cdot c\right), a, \left(z \cdot y\right) \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(i \cdot t\right) \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 49.7% accurate, 1.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -9.49999999999999999e186 or 4.8999999999999999e79 < z

    1. Initial program 57.5%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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.f6476.1

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

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

    if -9.49999999999999999e186 < z < -7.80000000000000039e-131

    1. Initial program 80.3%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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-*.f6450.6

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

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

    if -7.80000000000000039e-131 < z < 2.4000000000000001e-32

    1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.4000000000000001e-32 < z < 4.8999999999999999e79

    1. Initial program 68.0%

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

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

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

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

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

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

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

        \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j \]
      7. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \left(a \cdot c + \left(-1 \cdot i\right) \cdot y\right) \cdot j \]
      9. associate-*r*N/A

        \[\leadsto \left(a \cdot c + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      10. +-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot y\right) + a \cdot c\right) \cdot j \]
      11. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + a \cdot c\right) \cdot j \]
      12. mul-1-negN/A

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

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

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

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

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

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

Alternative 9: 49.7% accurate, 1.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -9.49999999999999999e186 or 4.8999999999999999e79 < z

    1. Initial program 57.5%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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.f6476.1

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

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

    if -9.49999999999999999e186 < z < -7.80000000000000039e-131

    1. Initial program 80.3%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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-*.f6450.6

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

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

    if -7.80000000000000039e-131 < z < 2.4000000000000001e-32

    1. Initial program 78.7%

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

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

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

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

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

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

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

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

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

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

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

    if 2.4000000000000001e-32 < z < 4.8999999999999999e79

    1. Initial program 68.0%

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

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

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

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

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

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

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

        \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j \]
      7. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \left(a \cdot c + \left(-1 \cdot i\right) \cdot y\right) \cdot j \]
      9. associate-*r*N/A

        \[\leadsto \left(a \cdot c + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      10. +-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot y\right) + a \cdot c\right) \cdot j \]
      11. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + a \cdot c\right) \cdot j \]
      12. mul-1-negN/A

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

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

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

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

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

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

Alternative 10: 44.1% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\ \mathbf{if}\;y \leq -5.4 \cdot 10^{+104}:\\ \;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-267}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{-229}:\\ \;\;\;\;\mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{-15}:\\ \;\;\;\;t\_1\\ \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
 (let* ((t_1 (* (fma j a (* (- b) z)) c)))
   (if (<= y -5.4e+104)
     (* (- i) (* j y))
     (if (<= y -2e-267)
       t_1
       (if (<= y 2.8e-229)
         (* (fma i t (* (- c) z)) b)
         (if (<= y 4.4e-15) t_1 (* (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 t_1 = fma(j, a, (-b * z)) * c;
	double tmp;
	if (y <= -5.4e+104) {
		tmp = -i * (j * y);
	} else if (y <= -2e-267) {
		tmp = t_1;
	} else if (y <= 2.8e-229) {
		tmp = fma(i, t, (-c * z)) * b;
	} else if (y <= 4.4e-15) {
		tmp = t_1;
	} else {
		tmp = fma(y, x, (-b * c)) * z;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(fma(j, a, Float64(Float64(-b) * z)) * c)
	tmp = 0.0
	if (y <= -5.4e+104)
		tmp = Float64(Float64(-i) * Float64(j * y));
	elseif (y <= -2e-267)
		tmp = t_1;
	elseif (y <= 2.8e-229)
		tmp = Float64(fma(i, t, Float64(Float64(-c) * z)) * b);
	elseif (y <= 4.4e-15)
		tmp = t_1;
	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_] := Block[{t$95$1 = N[(N[(j * a + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[y, -5.4e+104], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2e-267], t$95$1, If[LessEqual[y, 2.8e-229], N[(N[(i * t + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[y, 4.4e-15], t$95$1, N[(N[(y * x + N[((-b) * c), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -2 \cdot 10^{-267}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y \leq 4.4 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 64.7%

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

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

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

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

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

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

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

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

        \[\leadsto \left(-i\right) \cdot \mathsf{fma}\left(j, y, \left(\mathsf{neg}\left(b\right)\right) \cdot t\right) \]
      8. lower-neg.f6449.6

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

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

      \[\leadsto \left(-i\right) \cdot \left(j \cdot \color{blue}{y}\right) \]
    7. Step-by-step derivation
      1. lift-*.f6444.8

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

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

    if -5.39999999999999969e104 < y < -2e-267 or 2.7999999999999999e-229 < y < 4.39999999999999971e-15

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

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

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

    if -2e-267 < y < 2.7999999999999999e-229

    1. Initial program 81.8%

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

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

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

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

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

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

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

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

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

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

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

    if 4.39999999999999971e-15 < y

    1. Initial program 68.5%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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.f6458.1

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

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

Alternative 11: 43.6% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;c \leq -1.9 \cdot 10^{-225}:\\
\;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if c < -2.10000000000000011e-64 or 4.3999999999999998e-10 < c

    1. Initial program 62.6%

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

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

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

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

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

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

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

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

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

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

    if -2.10000000000000011e-64 < c < -1.9000000000000001e-225

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(-1 \cdot \left(a \cdot x\right)\right) \cdot t \]
    10. 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.f6452.5

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

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

    if -1.9000000000000001e-225 < c < 2.5999999999999999e-216

    1. Initial program 77.8%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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-*.f6465.8

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

      \[\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-*.f6446.0

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

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

    if 2.5999999999999999e-216 < c < 4.3999999999999998e-10

    1. Initial program 78.9%

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

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

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

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

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

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

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

        \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j \]
      7. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \left(a \cdot c + \left(-1 \cdot i\right) \cdot y\right) \cdot j \]
      9. associate-*r*N/A

        \[\leadsto \left(a \cdot c + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      10. +-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot y\right) + a \cdot c\right) \cdot j \]
      11. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + a \cdot c\right) \cdot j \]
      12. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 55.2% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.62 \cdot 10^{+174} \lor \neg \left(z \leq 5.2 \cdot 10^{+83}\right):\\
\;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.62000000000000007e174 or 5.2000000000000002e83 < z

    1. Initial program 57.8%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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.f6475.7

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

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

    if -1.62000000000000007e174 < z < 5.2000000000000002e83

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 29.9% accurate, 1.6× speedup?

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

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

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

\mathbf{elif}\;t \leq 1.85 \cdot 10^{-7}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\

\mathbf{elif}\;t \leq 6.2 \cdot 10^{+181}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6e14 or 6.19999999999999978e181 < t

    1. Initial program 59.3%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\right)\right) \]
    5. Applied rewrites62.1%

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

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

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

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

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

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

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

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

    if -6e14 < t < -2.44999999999999994e-57

    1. Initial program 75.5%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\right)\right) \]
    5. Applied rewrites80.1%

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

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6455.7

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

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

    if -2.44999999999999994e-57 < t < 1.85000000000000002e-7

    1. Initial program 81.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \left(j \cdot y\right) + \left(\left(\left(\mathsf{neg}\left(t\right)\right) \cdot x + j \cdot c\right) \cdot a + \color{blue}{\left(z \cdot y\right)} \cdot x\right) \]
    8. Applied rewrites75.2%

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

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

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

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

        \[\leadsto \left(j \cdot c\right) \cdot a \]
      4. lift-*.f6435.0

        \[\leadsto \left(j \cdot c\right) \cdot a \]
    11. Applied rewrites35.0%

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

    if 1.85000000000000002e-7 < t < 6.19999999999999978e181

    1. Initial program 61.5%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(i, t, \left(\mathsf{neg}\left(c\right)\right) \cdot z\right) \cdot b \]
      8. lower-neg.f6449.2

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

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

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

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

      \[\leadsto \left(i \cdot t\right) \cdot b \]
  3. Recombined 4 regimes into one program.
  4. Final simplification40.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{+14}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{elif}\;t \leq -2.45 \cdot 10^{-57}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{-7}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+181}:\\ \;\;\;\;\left(i \cdot t\right) \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 53.0% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;c \leq -3.7 \cdot 10^{-103}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -1.17999999999999997e24 or 1.1999999999999999e-6 < c

    1. Initial program 59.1%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c \]
    5. Applied rewrites64.6%

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

    if -1.17999999999999997e24 < c < -3.6999999999999999e-103

    1. Initial program 84.5%

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

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

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

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

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

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

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

        \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j \]
      7. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \left(a \cdot c + \left(-1 \cdot i\right) \cdot y\right) \cdot j \]
      9. associate-*r*N/A

        \[\leadsto \left(a \cdot c + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      10. +-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot y\right) + a \cdot c\right) \cdot j \]
      11. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + a \cdot c\right) \cdot j \]
      12. mul-1-negN/A

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

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

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

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

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

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

    if -3.6999999999999999e-103 < c < 1.1999999999999999e-6

    1. Initial program 81.4%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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-*.f6456.9

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

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

Alternative 15: 43.4% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(i, t, \left(-c\right) \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -4.6 \cdot 10^{-93}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq 7.4 \cdot 10^{-274}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\

\mathbf{elif}\;b \leq 9 \cdot 10^{-39}:\\
\;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot j\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -4.5999999999999996e-93 or 9.0000000000000002e-39 < b

    1. Initial program 70.8%

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

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

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

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

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

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

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

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

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

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

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

    if -4.5999999999999996e-93 < b < 7.39999999999999967e-274

    1. Initial program 70.2%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\right)\right) \]
    5. Applied rewrites54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      8. lower-*.f6438.7

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

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

    if 7.39999999999999967e-274 < b < 9.0000000000000002e-39

    1. Initial program 73.2%

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

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

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

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

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

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

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

        \[\leadsto \left(a \cdot c - i \cdot y\right) \cdot j \]
      7. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \left(a \cdot c + \left(-1 \cdot i\right) \cdot y\right) \cdot j \]
      9. associate-*r*N/A

        \[\leadsto \left(a \cdot c + -1 \cdot \left(i \cdot y\right)\right) \cdot j \]
      10. +-commutativeN/A

        \[\leadsto \left(-1 \cdot \left(i \cdot y\right) + a \cdot c\right) \cdot j \]
      11. associate-*r*N/A

        \[\leadsto \left(\left(-1 \cdot i\right) \cdot y + a \cdot c\right) \cdot j \]
      12. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 52.6% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.5 \cdot 10^{-43} \lor \neg \left(c \leq 1.2 \cdot 10^{-6}\right):\\
\;\;\;\;\mathsf{fma}\left(j, a, \left(-b\right) \cdot z\right) \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < -1.50000000000000002e-43 or 1.1999999999999999e-6 < c

    1. Initial program 61.0%

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

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

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

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

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

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

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

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

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

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

    if -1.50000000000000002e-43 < c < 1.1999999999999999e-6

    1. Initial program 83.0%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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-*.f6453.6

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

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

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

Alternative 17: 30.4% 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 -3.6 \cdot 10^{+80}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq -1.9 \cdot 10^{-225}:\\ \;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\ \mathbf{elif}\;c \leq 5.7 \cdot 10^{+88}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \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 -3.6e+80)
     t_1
     (if (<= c -1.9e-225)
       (* (* (- a) x) t)
       (if (<= c 5.7e+88) (* (* z x) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (-c * z) * b;
	double tmp;
	if (c <= -3.6e+80) {
		tmp = t_1;
	} else if (c <= -1.9e-225) {
		tmp = (-a * x) * t;
	} else if (c <= 5.7e+88) {
		tmp = (z * x) * y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (-c * z) * b
    if (c <= (-3.6d+80)) then
        tmp = t_1
    else if (c <= (-1.9d-225)) then
        tmp = (-a * x) * t
    else if (c <= 5.7d+88) then
        tmp = (z * x) * y
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (-c * z) * b;
	double tmp;
	if (c <= -3.6e+80) {
		tmp = t_1;
	} else if (c <= -1.9e-225) {
		tmp = (-a * x) * t;
	} else if (c <= 5.7e+88) {
		tmp = (z * x) * y;
	} 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 <= -3.6e+80:
		tmp = t_1
	elif c <= -1.9e-225:
		tmp = (-a * x) * t
	elif c <= 5.7e+88:
		tmp = (z * x) * y
	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 <= -3.6e+80)
		tmp = t_1;
	elseif (c <= -1.9e-225)
		tmp = Float64(Float64(Float64(-a) * x) * t);
	elseif (c <= 5.7e+88)
		tmp = Float64(Float64(z * x) * y);
	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 <= -3.6e+80)
		tmp = t_1;
	elseif (c <= -1.9e-225)
		tmp = (-a * x) * t;
	elseif (c <= 5.7e+88)
		tmp = (z * x) * y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[c, -3.6e+80], t$95$1, If[LessEqual[c, -1.9e-225], N[(N[((-a) * x), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[c, 5.7e+88], N[(N[(z * x), $MachinePrecision] * y), $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 -3.6 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq -1.9 \cdot 10^{-225}:\\
\;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\

\mathbf{elif}\;c \leq 5.7 \cdot 10^{+88}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -3.59999999999999995e80 or 5.70000000000000021e88 < c

    1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, t, \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.8

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

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

    if -3.59999999999999995e80 < c < -1.9000000000000001e-225

    1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(-1 \cdot \left(a \cdot x\right)\right) \cdot t \]
    10. 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.f6439.0

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

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

    if -1.9000000000000001e-225 < c < 5.70000000000000021e88

    1. Initial program 79.0%

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

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites49.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-*.f6433.5

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

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

Alternative 18: 30.4% 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 -3.7 \cdot 10^{+80}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq -2 \cdot 10^{-225}:\\ \;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\ \mathbf{elif}\;c \leq 5.7 \cdot 10^{+88}:\\ \;\;\;\;\left(z \cdot x\right) \cdot y\\ \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 -3.7e+80)
     t_1
     (if (<= c -2e-225)
       (* (- a) (* t x))
       (if (<= c 5.7e+88) (* (* z x) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (-c * z) * b;
	double tmp;
	if (c <= -3.7e+80) {
		tmp = t_1;
	} else if (c <= -2e-225) {
		tmp = -a * (t * x);
	} else if (c <= 5.7e+88) {
		tmp = (z * x) * y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a, b, c, i, j)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (-c * z) * b
    if (c <= (-3.7d+80)) then
        tmp = t_1
    else if (c <= (-2d-225)) then
        tmp = -a * (t * x)
    else if (c <= 5.7d+88) then
        tmp = (z * x) * y
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = (-c * z) * b;
	double tmp;
	if (c <= -3.7e+80) {
		tmp = t_1;
	} else if (c <= -2e-225) {
		tmp = -a * (t * x);
	} else if (c <= 5.7e+88) {
		tmp = (z * x) * y;
	} 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 <= -3.7e+80:
		tmp = t_1
	elif c <= -2e-225:
		tmp = -a * (t * x)
	elif c <= 5.7e+88:
		tmp = (z * x) * y
	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 <= -3.7e+80)
		tmp = t_1;
	elseif (c <= -2e-225)
		tmp = Float64(Float64(-a) * Float64(t * x));
	elseif (c <= 5.7e+88)
		tmp = Float64(Float64(z * x) * y);
	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 <= -3.7e+80)
		tmp = t_1;
	elseif (c <= -2e-225)
		tmp = -a * (t * x);
	elseif (c <= 5.7e+88)
		tmp = (z * x) * y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[c, -3.7e+80], t$95$1, If[LessEqual[c, -2e-225], N[((-a) * N[(t * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 5.7e+88], N[(N[(z * x), $MachinePrecision] * y), $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 -3.7 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;c \leq -2 \cdot 10^{-225}:\\
\;\;\;\;\left(-a\right) \cdot \left(t \cdot x\right)\\

\mathbf{elif}\;c \leq 5.7 \cdot 10^{+88}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < -3.69999999999999996e80 or 5.70000000000000021e88 < c

    1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(i, t, \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.8

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

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

    if -3.69999999999999996e80 < c < -1.9999999999999999e-225

    1. Initial program 82.2%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\right)\right) \]
    5. Applied rewrites56.9%

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

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

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

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

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

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

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

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

    if -1.9999999999999999e-225 < c < 5.70000000000000021e88

    1. Initial program 79.0%

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

        \[\leadsto \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y \]
    5. Applied rewrites49.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-*.f6433.5

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

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

Alternative 19: 28.8% accurate, 2.6× speedup?

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

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

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

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

\mathbf{elif}\;y \leq 4.4 \cdot 10^{-15}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\

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


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

    1. Initial program 64.9%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\right)\right) \]
    5. Applied rewrites49.0%

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

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6434.8

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

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

    if -2.65000000000000014e126 < y < 4.39999999999999971e-15

    1. Initial program 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\mathsf{neg}\left(i\right)\right) \cdot \left(j \cdot y\right) + \left(\left(\left(\mathsf{neg}\left(t\right)\right) \cdot x + j \cdot c\right) \cdot a + \color{blue}{\left(z \cdot y\right)} \cdot x\right) \]
    8. Applied rewrites62.6%

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

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

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

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

        \[\leadsto \left(j \cdot c\right) \cdot a \]
      4. lift-*.f6430.2

        \[\leadsto \left(j \cdot c\right) \cdot a \]
    11. Applied rewrites30.2%

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

    if 4.39999999999999971e-15 < y

    1. Initial program 68.5%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\right)\right) \]
    5. Applied rewrites64.7%

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

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6446.1

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.65 \cdot 10^{+126}:\\ \;\;\;\;\left(z \cdot y\right) \cdot x\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{-15}:\\ \;\;\;\;\left(j \cdot c\right) \cdot a\\ \mathbf{else}:\\ \;\;\;\;\left(y \cdot x\right) \cdot z\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 22.3% accurate, 3.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.14999999999999996e-154

    1. Initial program 67.2%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\right)\right) \]
    5. Applied rewrites63.6%

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

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6428.4

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

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

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

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

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

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

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

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

        \[\leadsto \left(y \cdot x\right) \cdot z \]
      8. lower-*.f6432.9

        \[\leadsto \left(y \cdot x\right) \cdot z \]
    10. Applied rewrites32.9%

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

    if -2.14999999999999996e-154 < x

    1. Initial program 73.6%

      \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
    2. 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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\right)\right) \]
    5. Applied rewrites58.3%

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

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

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

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

        \[\leadsto \left(z \cdot y\right) \cdot x \]
      4. lift-*.f6420.7

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

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

Alternative 21: 22.1% accurate, 5.5× speedup?

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

\\
\left(y \cdot x\right) \cdot z
\end{array}
Derivation
  1. Initial program 71.1%

    \[\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \]
  2. 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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\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 - i \cdot t\right)\right) \]
  5. Applied rewrites60.4%

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

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

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

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

      \[\leadsto \left(z \cdot y\right) \cdot x \]
    4. lift-*.f6423.8

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(y \cdot x\right) \cdot z \]
  11. Add Preprocessing

Developer Target 1: 59.2% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\ t_2 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + t\_1\\ \mathbf{if}\;x < -1.469694296777705 \cdot 10^{-64}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x < 3.2113527362226803 \cdot 10^{-147}:\\ \;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j)
 :precision binary64
 (let* ((t_1 (* j (- (* c a) (* y i))))
        (t_2
         (+
          (-
           (* x (- (* y z) (* t a)))
           (/
            (* b (- (pow (* c z) 2.0) (pow (* t i) 2.0)))
            (+ (* c z) (* t i))))
          t_1)))
   (if (< x -1.469694296777705e-64)
     t_2
     (if (< x 3.2113527362226803e-147)
       (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) t_1))
       t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
	double t_1 = j * ((c * a) - (y * i));
	double t_2 = ((x * ((y * z) - (t * a))) - ((b * (pow((c * z), 2.0) - pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
	double tmp;
	if (x < -1.469694296777705e-64) {
		tmp = t_2;
	} else if (x < 3.2113527362226803e-147) {
		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - 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 = j * ((c * a) - (y * i))
    t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ** 2.0d0) - ((t * i) ** 2.0d0))) / ((c * z) + (t * i)))) + t_1
    if (x < (-1.469694296777705d-64)) then
        tmp = t_2
    else if (x < 3.2113527362226803d-147) then
        tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - 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 = j * ((c * a) - (y * i));
	double t_2 = ((x * ((y * z) - (t * a))) - ((b * (Math.pow((c * z), 2.0) - Math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
	double tmp;
	if (x < -1.469694296777705e-64) {
		tmp = t_2;
	} else if (x < 3.2113527362226803e-147) {
		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j):
	t_1 = j * ((c * a) - (y * i))
	t_2 = ((x * ((y * z) - (t * a))) - ((b * (math.pow((c * z), 2.0) - math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1
	tmp = 0
	if x < -1.469694296777705e-64:
		tmp = t_2
	elif x < 3.2113527362226803e-147:
		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j)
	t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i)))
	t_2 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(Float64(b * Float64((Float64(c * z) ^ 2.0) - (Float64(t * i) ^ 2.0))) / Float64(Float64(c * z) + Float64(t * i)))) + t_1)
	tmp = 0.0
	if (x < -1.469694296777705e-64)
		tmp = t_2;
	elseif (x < 3.2113527362226803e-147)
		tmp = Float64(Float64(Float64(Float64(b * i) - Float64(x * a)) * t) - Float64(Float64(z * Float64(c * b)) - 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 = j * ((c * a) - (y * i));
	t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ^ 2.0) - ((t * i) ^ 2.0))) / ((c * z) + (t * i)))) + t_1;
	tmp = 0.0;
	if (x < -1.469694296777705e-64)
		tmp = t_2;
	elseif (x < 3.2113527362226803e-147)
		tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - 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[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[Power[N[(c * z), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(t * i), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * z), $MachinePrecision] + N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[Less[x, -1.469694296777705e-64], t$95$2, If[Less[x, 3.2113527362226803e-147], N[(N[(N[(N[(b * i), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] - N[(N[(z * N[(c * b), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
t_2 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + t\_1\\
\mathbf{if}\;x < -1.469694296777705 \cdot 10^{-64}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x < 3.2113527362226803 \cdot 10^{-147}:\\
\;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - t\_1\right)\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2025037 
(FPCore (x y z t a b c i j)
  :name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< x -293938859355541/2000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))) (if (< x 32113527362226803/10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) (* j (- (* c a) (* y i))))) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))))))

  (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))