Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E

Percentage Accurate: 85.3% → 94.6%
Time: 7.7s
Alternatives: 19
Speedup: 1.1×

Specification

?
\[\begin{array}{l} \\ \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (-
  (-
   (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c))
   (* (* x 4.0) i))
  (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
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, k)
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), intent (in) :: k
    code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
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 k) {
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k):
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k)
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k))
end
function tmp = code(x, y, z, t, a, b, c, i, j, k)
	tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 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: 85.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (-
  (-
   (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c))
   (* (* x 4.0) i))
  (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
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, k)
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), intent (in) :: k
    code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
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 k) {
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k):
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k)
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k))
end
function tmp = code(x, y, z, t, a, b, c, i, j, k)
	tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 94.6% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4 \cdot x, i, \mathsf{fma}\left(\mathsf{fma}\left(z, y \cdot \left(18 \cdot x\right), -4 \cdot a\right), t, c \cdot b\right)\right)\right)\\ \mathbf{if}\;t \leq -1.45 \cdot 10^{-55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-61}:\\ \;\;\;\;\mathsf{fma}\left(y, \left(18 \cdot x\right) \cdot \left(t \cdot z\right), \mathsf{fma}\left(-4 \cdot a, t, \mathsf{fma}\left(c, b, \left(-4 \cdot x\right) \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1
         (fma
          (* -27.0 j)
          k
          (fma
           (* -4.0 x)
           i
           (fma (fma z (* y (* 18.0 x)) (* -4.0 a)) t (* c b))))))
   (if (<= t -1.45e-55)
     t_1
     (if (<= t 5.8e-61)
       (-
        (fma
         y
         (* (* 18.0 x) (* t z))
         (fma (* -4.0 a) t (fma c b (* (* -4.0 x) i))))
        (* (* j 27.0) k))
       t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = fma((-27.0 * j), k, fma((-4.0 * x), i, fma(fma(z, (y * (18.0 * x)), (-4.0 * a)), t, (c * b))));
	double tmp;
	if (t <= -1.45e-55) {
		tmp = t_1;
	} else if (t <= 5.8e-61) {
		tmp = fma(y, ((18.0 * x) * (t * z)), fma((-4.0 * a), t, fma(c, b, ((-4.0 * x) * i)))) - ((j * 27.0) * k);
	} else {
		tmp = t_1;
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = fma(Float64(-27.0 * j), k, fma(Float64(-4.0 * x), i, fma(fma(z, Float64(y * Float64(18.0 * x)), Float64(-4.0 * a)), t, Float64(c * b))))
	tmp = 0.0
	if (t <= -1.45e-55)
		tmp = t_1;
	elseif (t <= 5.8e-61)
		tmp = Float64(fma(y, Float64(Float64(18.0 * x) * Float64(t * z)), fma(Float64(-4.0 * a), t, fma(c, b, Float64(Float64(-4.0 * x) * i)))) - Float64(Float64(j * 27.0) * k));
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(-27.0 * j), $MachinePrecision] * k + N[(N[(-4.0 * x), $MachinePrecision] * i + N[(N[(z * N[(y * N[(18.0 * x), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] * t + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.45e-55], t$95$1, If[LessEqual[t, 5.8e-61], N[(N[(y * N[(N[(18.0 * x), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(N[(-4.0 * a), $MachinePrecision] * t + N[(c * b + N[(N[(-4.0 * x), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4 \cdot x, i, \mathsf{fma}\left(\mathsf{fma}\left(z, y \cdot \left(18 \cdot x\right), -4 \cdot a\right), t, c \cdot b\right)\right)\right)\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{-55}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 5.8 \cdot 10^{-61}:\\
\;\;\;\;\mathsf{fma}\left(y, \left(18 \cdot x\right) \cdot \left(t \cdot z\right), \mathsf{fma}\left(-4 \cdot a, t, \mathsf{fma}\left(c, b, \left(-4 \cdot x\right) \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.45e-55 or 5.7999999999999999e-61 < t

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

    if -1.45e-55 < t < 5.7999999999999999e-61

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

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

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

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

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k \]
      5. sub-flipN/A

        \[\leadsto \left(\color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t + \left(\mathsf{neg}\left(\left(a \cdot 4\right) \cdot t\right)\right)\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k \]
      6. associate-+l+N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t + \left(\left(\mathsf{neg}\left(\left(a \cdot 4\right) \cdot t\right)\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      7. lift-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t} + \left(\left(\mathsf{neg}\left(\left(a \cdot 4\right) \cdot t\right)\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      8. lift-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right)} \cdot t + \left(\left(\mathsf{neg}\left(\left(a \cdot 4\right) \cdot t\right)\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      9. associate-*l*N/A

        \[\leadsto \left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right) \cdot \left(z \cdot t\right)} + \left(\left(\mathsf{neg}\left(\left(a \cdot 4\right) \cdot t\right)\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      10. lift-*.f64N/A

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

        \[\leadsto \left(\color{blue}{\left(y \cdot \left(x \cdot 18\right)\right)} \cdot \left(z \cdot t\right) + \left(\left(\mathsf{neg}\left(\left(a \cdot 4\right) \cdot t\right)\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      12. associate-*l*N/A

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \left(x \cdot 18\right) \cdot \left(z \cdot t\right), \left(\mathsf{neg}\left(\left(a \cdot 4\right) \cdot t\right)\right) + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    3. Applied rewrites87.6%

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

Alternative 2: 90.9% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4 \cdot x, i, \mathsf{fma}\left(\mathsf{fma}\left(z, y \cdot \left(18 \cdot x\right), -4 \cdot a\right), t, c \cdot b\right)\right)\right) \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (fma
  (* -27.0 j)
  k
  (fma (* -4.0 x) i (fma (fma z (* y (* 18.0 x)) (* -4.0 a)) t (* c b)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return fma((-27.0 * j), k, fma((-4.0 * x), i, fma(fma(z, (y * (18.0 * x)), (-4.0 * a)), t, (c * b))));
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	return fma(Float64(-27.0 * j), k, fma(Float64(-4.0 * x), i, fma(fma(z, Float64(y * Float64(18.0 * x)), Float64(-4.0 * a)), t, Float64(c * b))))
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(-27.0 * j), $MachinePrecision] * k + N[(N[(-4.0 * x), $MachinePrecision] * i + N[(N[(z * N[(y * N[(18.0 * x), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] * t + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4 \cdot x, i, \mathsf{fma}\left(\mathsf{fma}\left(z, y \cdot \left(18 \cdot x\right), -4 \cdot a\right), t, c \cdot b\right)\right)\right)
\end{array}
Derivation
  1. Initial program 85.3%

    \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
  2. Step-by-step derivation
    1. lift--.f64N/A

      \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
    2. sub-flipN/A

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
    7. lift-*.f64N/A

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

      \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
    9. distribute-lft-neg-inN/A

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

      \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
    11. metadata-eval86.5

      \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
    12. lift--.f64N/A

      \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
    13. sub-flipN/A

      \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
    14. +-commutativeN/A

      \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
  3. Applied rewrites90.9%

    \[\leadsto \color{blue}{\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4 \cdot x, i, \mathsf{fma}\left(\mathsf{fma}\left(z, y \cdot \left(18 \cdot x\right), -4 \cdot a\right), t, c \cdot b\right)\right)\right)} \]
  4. Add Preprocessing

Alternative 3: 83.0% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{if}\;b \cdot c \leq -4 \cdot 10^{+177}:\\ \;\;\;\;\mathsf{fma}\left(\left(t \cdot 18\right) \cdot \left(y \cdot x\right), z, b \cdot c - \left(27 \cdot j\right) \cdot k\right)\\ \mathbf{elif}\;b \cdot c \leq 10:\\ \;\;\;\;\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4, i \cdot x, t\_1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t\_1\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* t (fma -4.0 a (* 18.0 (* x (* y z)))))))
   (if (<= (* b c) -4e+177)
     (fma (* (* t 18.0) (* y x)) z (- (* b c) (* (* 27.0 j) k)))
     (if (<= (* b c) 10.0)
       (fma (* -27.0 j) k (fma -4.0 (* i x) t_1))
       (fma -27.0 (* j k) (fma b c t_1))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = t * fma(-4.0, a, (18.0 * (x * (y * z))));
	double tmp;
	if ((b * c) <= -4e+177) {
		tmp = fma(((t * 18.0) * (y * x)), z, ((b * c) - ((27.0 * j) * k)));
	} else if ((b * c) <= 10.0) {
		tmp = fma((-27.0 * j), k, fma(-4.0, (i * x), t_1));
	} else {
		tmp = fma(-27.0, (j * k), fma(b, c, t_1));
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z)))))
	tmp = 0.0
	if (Float64(b * c) <= -4e+177)
		tmp = fma(Float64(Float64(t * 18.0) * Float64(y * x)), z, Float64(Float64(b * c) - Float64(Float64(27.0 * j) * k)));
	elseif (Float64(b * c) <= 10.0)
		tmp = fma(Float64(-27.0 * j), k, fma(-4.0, Float64(i * x), t_1));
	else
		tmp = fma(-27.0, Float64(j * k), fma(b, c, t_1));
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -4e+177], N[(N[(N[(t * 18.0), $MachinePrecision] * N[(y * x), $MachinePrecision]), $MachinePrecision] * z + N[(N[(b * c), $MachinePrecision] - N[(N[(27.0 * j), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 10.0], N[(N[(-27.0 * j), $MachinePrecision] * k + N[(-4.0 * N[(i * x), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision] + N[(b * c + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;b \cdot c \leq -4 \cdot 10^{+177}:\\
\;\;\;\;\mathsf{fma}\left(\left(t \cdot 18\right) \cdot \left(y \cdot x\right), z, b \cdot c - \left(27 \cdot j\right) \cdot k\right)\\

\mathbf{elif}\;b \cdot c \leq 10:\\
\;\;\;\;\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4, i \cdot x, t\_1\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -4e177

    1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(18, t \cdot \left(x \cdot \left(y \cdot z\right)\right), b \cdot c\right) - \mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right) \]
      10. lower-*.f6472.9

        \[\leadsto \mathsf{fma}\left(18, t \cdot \left(x \cdot \left(y \cdot z\right)\right), b \cdot c\right) - \mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right) \]
    4. Applied rewrites72.9%

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

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

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

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

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

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

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

        \[\leadsto 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + \color{blue}{\left(b \cdot c - 27 \cdot \left(j \cdot k\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + \left(b \cdot \color{blue}{c} - 27 \cdot \left(j \cdot k\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(18 \cdot t\right) \cdot \left(x \cdot \left(y \cdot z\right)\right) + \left(\color{blue}{b \cdot c} - 27 \cdot \left(j \cdot k\right)\right) \]
      6. lift-*.f64N/A

        \[\leadsto \left(18 \cdot t\right) \cdot \left(x \cdot \left(y \cdot z\right)\right) + \left(b \cdot \color{blue}{c} - 27 \cdot \left(j \cdot k\right)\right) \]
      7. lift-*.f64N/A

        \[\leadsto \left(18 \cdot t\right) \cdot \left(x \cdot \left(y \cdot z\right)\right) + \left(b \cdot c - 27 \cdot \left(j \cdot k\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) + \left(b \cdot \color{blue}{c} - 27 \cdot \left(j \cdot k\right)\right) \]
      9. associate-*r*N/A

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(t \cdot 18\right) \cdot \left(y \cdot x\right), z, b \cdot c - 27 \cdot \left(j \cdot k\right)\right) \]
    9. Applied rewrites63.7%

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

    if -4e177 < (*.f64 b c) < 10

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

      \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{-4 \cdot \left(i \cdot x\right) + t \cdot \left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)}\right) \]
    5. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4, i \cdot x, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      7. lower-*.f6472.4

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4, i \cdot x, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
    6. Applied rewrites72.4%

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

    if 10 < (*.f64 b c)

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      8. lower-*.f6476.6

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

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

Alternative 4: 82.2% accurate, 0.9× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := \left(j \cdot 27\right) \cdot k\\ t_2 := x \cdot \left(y \cdot z\right)\\ t_3 := \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot t\_2\right)\right)\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-58}:\\ \;\;\;\;\mathsf{fma}\left(-27, j \cdot k, t\_3\right)\\ \mathbf{elif}\;t\_1 \leq 3 \cdot 10^{+227}:\\ \;\;\;\;\mathsf{fma}\left(-4, i \cdot x, t\_3\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4 \cdot x, i, 18 \cdot \left(t \cdot t\_2\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* (* j 27.0) k))
        (t_2 (* x (* y z)))
        (t_3 (fma b c (* t (fma -4.0 a (* 18.0 t_2))))))
   (if (<= t_1 -2e-58)
     (fma -27.0 (* j k) t_3)
     (if (<= t_1 3e+227)
       (fma -4.0 (* i x) t_3)
       (fma (* -27.0 j) k (fma (* -4.0 x) i (* 18.0 (* t t_2))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (j * 27.0) * k;
	double t_2 = x * (y * z);
	double t_3 = fma(b, c, (t * fma(-4.0, a, (18.0 * t_2))));
	double tmp;
	if (t_1 <= -2e-58) {
		tmp = fma(-27.0, (j * k), t_3);
	} else if (t_1 <= 3e+227) {
		tmp = fma(-4.0, (i * x), t_3);
	} else {
		tmp = fma((-27.0 * j), k, fma((-4.0 * x), i, (18.0 * (t * t_2))));
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(j * 27.0) * k)
	t_2 = Float64(x * Float64(y * z))
	t_3 = fma(b, c, Float64(t * fma(-4.0, a, Float64(18.0 * t_2))))
	tmp = 0.0
	if (t_1 <= -2e-58)
		tmp = fma(-27.0, Float64(j * k), t_3);
	elseif (t_1 <= 3e+227)
		tmp = fma(-4.0, Float64(i * x), t_3);
	else
		tmp = fma(Float64(-27.0 * j), k, fma(Float64(-4.0 * x), i, Float64(18.0 * Float64(t * t_2))));
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b * c + N[(t * N[(-4.0 * a + N[(18.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-58], N[(-27.0 * N[(j * k), $MachinePrecision] + t$95$3), $MachinePrecision], If[LessEqual[t$95$1, 3e+227], N[(-4.0 * N[(i * x), $MachinePrecision] + t$95$3), $MachinePrecision], N[(N[(-27.0 * j), $MachinePrecision] * k + N[(N[(-4.0 * x), $MachinePrecision] * i + N[(18.0 * N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := x \cdot \left(y \cdot z\right)\\
t_3 := \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot t\_2\right)\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-58}:\\
\;\;\;\;\mathsf{fma}\left(-27, j \cdot k, t\_3\right)\\

\mathbf{elif}\;t\_1 \leq 3 \cdot 10^{+227}:\\
\;\;\;\;\mathsf{fma}\left(-4, i \cdot x, t\_3\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4 \cdot x, i, 18 \cdot \left(t \cdot t\_2\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.0000000000000001e-58

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      8. lower-*.f6476.6

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

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

    if -2.0000000000000001e-58 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.99999999999999986e227

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      8. lower-*.f6476.6

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.99999999999999986e227 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4 \cdot x, i, 18 \cdot \left(t \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right)\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4 \cdot x, i, 18 \cdot \left(t \cdot \left(x \cdot \color{blue}{\left(y \cdot z\right)}\right)\right)\right)\right) \]
      4. lower-*.f6459.2

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4 \cdot x, i, 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \color{blue}{z}\right)\right)\right)\right)\right) \]
    6. Applied rewrites59.2%

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

Alternative 5: 81.6% accurate, 1.2× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right)\\ \mathbf{if}\;t \leq -1 \cdot 10^{-85}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-95}:\\ \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(i \cdot x, -4, \left(k \cdot j\right) \cdot -27\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1
         (fma
          -27.0
          (* j k)
          (fma b c (* t (fma -4.0 a (* 18.0 (* x (* y z)))))))))
   (if (<= t -1e-85)
     t_1
     (if (<= t 1.7e-95) (fma c b (fma (* i x) -4.0 (* (* k j) -27.0))) t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = fma(-27.0, (j * k), fma(b, c, (t * fma(-4.0, a, (18.0 * (x * (y * z)))))));
	double tmp;
	if (t <= -1e-85) {
		tmp = t_1;
	} else if (t <= 1.7e-95) {
		tmp = fma(c, b, fma((i * x), -4.0, ((k * j) * -27.0)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = fma(-27.0, Float64(j * k), fma(b, c, Float64(t * fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z)))))))
	tmp = 0.0
	if (t <= -1e-85)
		tmp = t_1;
	elseif (t <= 1.7e-95)
		tmp = fma(c, b, fma(Float64(i * x), -4.0, Float64(Float64(k * j) * -27.0)));
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision] + N[(b * c + N[(t * N[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e-85], t$95$1, If[LessEqual[t, 1.7e-95], N[(c * b + N[(N[(i * x), $MachinePrecision] * -4.0 + N[(N[(k * j), $MachinePrecision] * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right)\\
\mathbf{if}\;t \leq -1 \cdot 10^{-85}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.7 \cdot 10^{-95}:\\
\;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(i \cdot x, -4, \left(k \cdot j\right) \cdot -27\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.9999999999999998e-86 or 1.69999999999999997e-95 < t

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      8. lower-*.f6476.6

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

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

    if -9.9999999999999998e-86 < t < 1.69999999999999997e-95

    1. Initial program 85.3%

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

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

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

        \[\leadsto b \cdot c - \left(\color{blue}{4 \cdot \left(i \cdot x\right)} + 27 \cdot \left(j \cdot k\right)\right) \]
      3. lower-fma.f64N/A

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

        \[\leadsto b \cdot c - \mathsf{fma}\left(4, i \cdot \color{blue}{x}, 27 \cdot \left(j \cdot k\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto b \cdot c - \mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right) \]
      6. lower-*.f6460.8

        \[\leadsto b \cdot c - \mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right) \]
    4. Applied rewrites60.8%

      \[\leadsto \color{blue}{b \cdot c - \mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right)} \]
    5. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto b \cdot c - \color{blue}{\mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right)} \]
      2. sub-flipN/A

        \[\leadsto b \cdot c + \color{blue}{\left(\mathsf{neg}\left(\mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. lift-*.f64N/A

        \[\leadsto b \cdot c + \left(\mathsf{neg}\left(\color{blue}{\mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right)}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto c \cdot b + \left(\mathsf{neg}\left(\color{blue}{\mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right)}\right)\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(c, \color{blue}{b}, \mathsf{neg}\left(\mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. lift-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(c, b, \mathsf{neg}\left(\left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      7. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(c, b, \mathsf{neg}\left(\left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      8. fp-cancel-sign-sub-invN/A

        \[\leadsto \mathsf{fma}\left(c, b, \mathsf{neg}\left(\left(4 \cdot \left(i \cdot x\right) - \left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)\right)\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(c, b, \mathsf{neg}\left(\left(4 \cdot \left(i \cdot x\right) - -27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      10. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(c, b, \mathsf{neg}\left(\left(4 \cdot \left(i \cdot x\right) - -27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(c, b, \mathsf{neg}\left(\left(4 \cdot \left(i \cdot x\right) - \left(-27 \cdot j\right) \cdot k\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(c, b, \mathsf{neg}\left(\left(4 \cdot \left(i \cdot x\right) - \left(-27 \cdot j\right) \cdot k\right)\right)\right) \]
      13. sub-negateN/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(-27 \cdot j\right) \cdot k - 4 \cdot \left(i \cdot x\right)\right) \]
      14. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(-27 \cdot j\right) \cdot k - \left(\mathsf{neg}\left(-4\right)\right) \cdot \left(i \cdot x\right)\right) \]
      15. fp-cancel-sign-sub-invN/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(-27 \cdot j\right) \cdot k + -4 \cdot \left(i \cdot x\right)\right) \]
      16. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(-27 \cdot j\right) \cdot k + -4 \cdot \left(i \cdot x\right)\right) \]
      17. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(-27 \cdot j\right) \cdot k + -4 \cdot \left(x \cdot i\right)\right) \]
      18. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(-27 \cdot j\right) \cdot k + \left(-4 \cdot x\right) \cdot i\right) \]
      19. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(-27 \cdot j\right) \cdot k + \left(-4 \cdot x\right) \cdot i\right) \]
      20. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(-27 \cdot j\right) \cdot k + \left(-4 \cdot x\right) \cdot i\right) \]
      21. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(-4 \cdot x\right) \cdot i + \left(-27 \cdot j\right) \cdot k\right) \]
    6. Applied rewrites61.4%

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

Alternative 6: 74.7% accurate, 1.2× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4 \cdot x, i, 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right)\\ \mathbf{if}\;x \leq -3.3 \cdot 10^{+58}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{+56}:\\ \;\;\;\;\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4, a \cdot t, b \cdot c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1
         (fma (* -27.0 j) k (fma (* -4.0 x) i (* 18.0 (* t (* x (* y z))))))))
   (if (<= x -3.3e+58)
     t_1
     (if (<= x 1.1e+56) (fma (* -27.0 j) k (fma -4.0 (* a t) (* b c))) t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = fma((-27.0 * j), k, fma((-4.0 * x), i, (18.0 * (t * (x * (y * z))))));
	double tmp;
	if (x <= -3.3e+58) {
		tmp = t_1;
	} else if (x <= 1.1e+56) {
		tmp = fma((-27.0 * j), k, fma(-4.0, (a * t), (b * c)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = fma(Float64(-27.0 * j), k, fma(Float64(-4.0 * x), i, Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))))
	tmp = 0.0
	if (x <= -3.3e+58)
		tmp = t_1;
	elseif (x <= 1.1e+56)
		tmp = fma(Float64(-27.0 * j), k, fma(-4.0, Float64(a * t), Float64(b * c)));
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(-27.0 * j), $MachinePrecision] * k + N[(N[(-4.0 * x), $MachinePrecision] * i + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.3e+58], t$95$1, If[LessEqual[x, 1.1e+56], N[(N[(-27.0 * j), $MachinePrecision] * k + N[(-4.0 * N[(a * t), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4 \cdot x, i, 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right)\\
\mathbf{if}\;x \leq -3.3 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 1.1 \cdot 10^{+56}:\\
\;\;\;\;\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4, a \cdot t, b \cdot c\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.29999999999999983e58 or 1.10000000000000008e56 < x

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4 \cdot x, i, 18 \cdot \left(t \cdot \color{blue}{\left(x \cdot \left(y \cdot z\right)\right)}\right)\right)\right) \]
      3. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4 \cdot x, i, 18 \cdot \left(t \cdot \left(x \cdot \color{blue}{\left(y \cdot z\right)}\right)\right)\right)\right) \]
      4. lower-*.f6459.2

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4 \cdot x, i, 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot \color{blue}{z}\right)\right)\right)\right)\right) \]
    6. Applied rewrites59.2%

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

    if -3.29999999999999983e58 < x < 1.10000000000000008e56

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

      \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c}\right) \]
    5. Step-by-step derivation
      1. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4, a \cdot \color{blue}{t}, b \cdot c\right)\right) \]
      3. lower-*.f6461.2

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

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

Alternative 7: 73.0% accurate, 1.5× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;x \leq -3.2 \cdot 10^{+58}:\\ \;\;\;\;\mathsf{fma}\left(-4, i \cdot x, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\\ \mathbf{elif}\;x \leq 2.25 \cdot 10^{+77}:\\ \;\;\;\;\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4, a \cdot t, b \cdot c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(-4, i, 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<= x -3.2e+58)
   (fma -4.0 (* i x) (* t (fma -4.0 a (* 18.0 (* x (* y z))))))
   (if (<= x 2.25e+77)
     (fma (* -27.0 j) k (fma -4.0 (* a t) (* b c)))
     (* x (fma -4.0 i (* 18.0 (* t (* y z))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (x <= -3.2e+58) {
		tmp = fma(-4.0, (i * x), (t * fma(-4.0, a, (18.0 * (x * (y * z))))));
	} else if (x <= 2.25e+77) {
		tmp = fma((-27.0 * j), k, fma(-4.0, (a * t), (b * c)));
	} else {
		tmp = x * fma(-4.0, i, (18.0 * (t * (y * z))));
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (x <= -3.2e+58)
		tmp = fma(-4.0, Float64(i * x), Float64(t * fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z))))));
	elseif (x <= 2.25e+77)
		tmp = fma(Float64(-27.0 * j), k, fma(-4.0, Float64(a * t), Float64(b * c)));
	else
		tmp = Float64(x * fma(-4.0, i, Float64(18.0 * Float64(t * Float64(y * z)))));
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -3.2e+58], N[(-4.0 * N[(i * x), $MachinePrecision] + N[(t * N[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.25e+77], N[(N[(-27.0 * j), $MachinePrecision] * k + N[(-4.0 * N[(a * t), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(-4.0 * i + N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{+58}:\\
\;\;\;\;\mathsf{fma}\left(-4, i \cdot x, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\\

\mathbf{elif}\;x \leq 2.25 \cdot 10^{+77}:\\
\;\;\;\;\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4, a \cdot t, b \cdot c\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.20000000000000015e58

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      8. lower-*.f6476.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-4, i \cdot x, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) \]
      7. lower-*.f6455.0

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

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

    if -3.20000000000000015e58 < x < 2.25000000000000012e77

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

      \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c}\right) \]
    5. Step-by-step derivation
      1. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4, a \cdot \color{blue}{t}, b \cdot c\right)\right) \]
      3. lower-*.f6461.2

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

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

    if 2.25000000000000012e77 < x

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

Alternative 8: 72.8% accurate, 1.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := x \cdot \mathsf{fma}\left(-4, i, 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{if}\;x \leq -3.3 \cdot 10^{+58}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.25 \cdot 10^{+77}:\\ \;\;\;\;\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4, a \cdot t, b \cdot c\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* x (fma -4.0 i (* 18.0 (* t (* y z)))))))
   (if (<= x -3.3e+58)
     t_1
     (if (<= x 2.25e+77) (fma (* -27.0 j) k (fma -4.0 (* a t) (* b c))) t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = x * fma(-4.0, i, (18.0 * (t * (y * z))));
	double tmp;
	if (x <= -3.3e+58) {
		tmp = t_1;
	} else if (x <= 2.25e+77) {
		tmp = fma((-27.0 * j), k, fma(-4.0, (a * t), (b * c)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(x * fma(-4.0, i, Float64(18.0 * Float64(t * Float64(y * z)))))
	tmp = 0.0
	if (x <= -3.3e+58)
		tmp = t_1;
	elseif (x <= 2.25e+77)
		tmp = fma(Float64(-27.0 * j), k, fma(-4.0, Float64(a * t), Float64(b * c)));
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(-4.0 * i + N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.3e+58], t$95$1, If[LessEqual[x, 2.25e+77], N[(N[(-27.0 * j), $MachinePrecision] * k + N[(-4.0 * N[(a * t), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \mathsf{fma}\left(-4, i, 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;x \leq -3.3 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 2.25 \cdot 10^{+77}:\\
\;\;\;\;\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4, a \cdot t, b \cdot c\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.29999999999999983e58 or 2.25000000000000012e77 < x

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

    if -3.29999999999999983e58 < x < 2.25000000000000012e77

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

      \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{-4 \cdot \left(a \cdot t\right) + b \cdot c}\right) \]
    5. Step-by-step derivation
      1. lower-fma.f64N/A

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

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(-4, a \cdot \color{blue}{t}, b \cdot c\right)\right) \]
      3. lower-*.f6461.2

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

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

Alternative 9: 69.9% accurate, 1.6× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := t \cdot \mathsf{fma}\left(\left(18 \cdot x\right) \cdot z, y, a \cdot -4\right)\\ \mathbf{if}\;t \leq -1.25 \cdot 10^{+128}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{-63}:\\ \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(i \cdot x, -4, \left(k \cdot j\right) \cdot -27\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* t (fma (* (* 18.0 x) z) y (* a -4.0)))))
   (if (<= t -1.25e+128)
     t_1
     (if (<= t 1.45e-63) (fma c b (fma (* i x) -4.0 (* (* k j) -27.0))) t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = t * fma(((18.0 * x) * z), y, (a * -4.0));
	double tmp;
	if (t <= -1.25e+128) {
		tmp = t_1;
	} else if (t <= 1.45e-63) {
		tmp = fma(c, b, fma((i * x), -4.0, ((k * j) * -27.0)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(t * fma(Float64(Float64(18.0 * x) * z), y, Float64(a * -4.0)))
	tmp = 0.0
	if (t <= -1.25e+128)
		tmp = t_1;
	elseif (t <= 1.45e-63)
		tmp = fma(c, b, fma(Float64(i * x), -4.0, Float64(Float64(k * j) * -27.0)));
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(N[(18.0 * x), $MachinePrecision] * z), $MachinePrecision] * y + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.25e+128], t$95$1, If[LessEqual[t, 1.45e-63], N[(c * b + N[(N[(i * x), $MachinePrecision] * -4.0 + N[(N[(k * j), $MachinePrecision] * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \mathsf{fma}\left(\left(18 \cdot x\right) \cdot z, y, a \cdot -4\right)\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.45 \cdot 10^{-63}:\\
\;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(i \cdot x, -4, \left(k \cdot j\right) \cdot -27\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.25e128 or 1.44999999999999987e-63 < t

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) \]
      5. lower-*.f6442.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \mathsf{fma}\left(\left(18 \cdot x\right) \cdot z, y, a \cdot -4\right) \]
      15. lower-*.f6443.6

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

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

    if -1.25e128 < t < 1.44999999999999987e-63

    1. Initial program 85.3%

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

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

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

        \[\leadsto b \cdot c - \left(\color{blue}{4 \cdot \left(i \cdot x\right)} + 27 \cdot \left(j \cdot k\right)\right) \]
      3. lower-fma.f64N/A

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

        \[\leadsto b \cdot c - \mathsf{fma}\left(4, i \cdot \color{blue}{x}, 27 \cdot \left(j \cdot k\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto b \cdot c - \mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right) \]
      6. lower-*.f6460.8

        \[\leadsto b \cdot c - \mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right) \]
    4. Applied rewrites60.8%

      \[\leadsto \color{blue}{b \cdot c - \mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right)} \]
    5. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto b \cdot c - \color{blue}{\mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right)} \]
      2. sub-flipN/A

        \[\leadsto b \cdot c + \color{blue}{\left(\mathsf{neg}\left(\mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right)\right)\right)} \]
      3. lift-*.f64N/A

        \[\leadsto b \cdot c + \left(\mathsf{neg}\left(\color{blue}{\mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right)}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto c \cdot b + \left(\mathsf{neg}\left(\color{blue}{\mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right)}\right)\right) \]
      5. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(c, \color{blue}{b}, \mathsf{neg}\left(\mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      6. lift-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(c, b, \mathsf{neg}\left(\left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      7. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(c, b, \mathsf{neg}\left(\left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      8. fp-cancel-sign-sub-invN/A

        \[\leadsto \mathsf{fma}\left(c, b, \mathsf{neg}\left(\left(4 \cdot \left(i \cdot x\right) - \left(\mathsf{neg}\left(27\right)\right) \cdot \left(j \cdot k\right)\right)\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(c, b, \mathsf{neg}\left(\left(4 \cdot \left(i \cdot x\right) - -27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      10. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(c, b, \mathsf{neg}\left(\left(4 \cdot \left(i \cdot x\right) - -27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(c, b, \mathsf{neg}\left(\left(4 \cdot \left(i \cdot x\right) - \left(-27 \cdot j\right) \cdot k\right)\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(c, b, \mathsf{neg}\left(\left(4 \cdot \left(i \cdot x\right) - \left(-27 \cdot j\right) \cdot k\right)\right)\right) \]
      13. sub-negateN/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(-27 \cdot j\right) \cdot k - 4 \cdot \left(i \cdot x\right)\right) \]
      14. metadata-evalN/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(-27 \cdot j\right) \cdot k - \left(\mathsf{neg}\left(-4\right)\right) \cdot \left(i \cdot x\right)\right) \]
      15. fp-cancel-sign-sub-invN/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(-27 \cdot j\right) \cdot k + -4 \cdot \left(i \cdot x\right)\right) \]
      16. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(-27 \cdot j\right) \cdot k + -4 \cdot \left(i \cdot x\right)\right) \]
      17. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(-27 \cdot j\right) \cdot k + -4 \cdot \left(x \cdot i\right)\right) \]
      18. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(-27 \cdot j\right) \cdot k + \left(-4 \cdot x\right) \cdot i\right) \]
      19. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(-27 \cdot j\right) \cdot k + \left(-4 \cdot x\right) \cdot i\right) \]
      20. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(-27 \cdot j\right) \cdot k + \left(-4 \cdot x\right) \cdot i\right) \]
      21. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(c, b, \left(-4 \cdot x\right) \cdot i + \left(-27 \cdot j\right) \cdot k\right) \]
    6. Applied rewrites61.4%

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

Alternative 10: 59.2% accurate, 1.3× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-27, j \cdot k, b \cdot c\right)\\ t_2 := x \cdot \mathsf{fma}\left(-4, i, 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{if}\;x \leq -3.2 \cdot 10^{+58}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -4.1 \cdot 10^{-108}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.05 \cdot 10^{-251}:\\ \;\;\;\;\mathsf{fma}\left(-4, a \cdot t, b \cdot c\right)\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{+73}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (fma -27.0 (* j k) (* b c)))
        (t_2 (* x (fma -4.0 i (* 18.0 (* t (* y z)))))))
   (if (<= x -3.2e+58)
     t_2
     (if (<= x -4.1e-108)
       t_1
       (if (<= x 1.05e-251)
         (fma -4.0 (* a t) (* b c))
         (if (<= x 2.2e+73) t_1 t_2))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = fma(-27.0, (j * k), (b * c));
	double t_2 = x * fma(-4.0, i, (18.0 * (t * (y * z))));
	double tmp;
	if (x <= -3.2e+58) {
		tmp = t_2;
	} else if (x <= -4.1e-108) {
		tmp = t_1;
	} else if (x <= 1.05e-251) {
		tmp = fma(-4.0, (a * t), (b * c));
	} else if (x <= 2.2e+73) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = fma(-27.0, Float64(j * k), Float64(b * c))
	t_2 = Float64(x * fma(-4.0, i, Float64(18.0 * Float64(t * Float64(y * z)))))
	tmp = 0.0
	if (x <= -3.2e+58)
		tmp = t_2;
	elseif (x <= -4.1e-108)
		tmp = t_1;
	elseif (x <= 1.05e-251)
		tmp = fma(-4.0, Float64(a * t), Float64(b * c));
	elseif (x <= 2.2e+73)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(-4.0 * i + N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.2e+58], t$95$2, If[LessEqual[x, -4.1e-108], t$95$1, If[LessEqual[x, 1.05e-251], N[(-4.0 * N[(a * t), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.2e+73], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-27, j \cdot k, b \cdot c\right)\\
t_2 := x \cdot \mathsf{fma}\left(-4, i, 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;x \leq -3.2 \cdot 10^{+58}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq -4.1 \cdot 10^{-108}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;x \leq 2.2 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.20000000000000015e58 or 2.2e73 < x

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

    if -3.20000000000000015e58 < x < -4.10000000000000037e-108 or 1.04999999999999991e-251 < x < 2.2e73

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      8. lower-*.f6476.6

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

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

      \[\leadsto -27 \cdot \left(j \cdot k\right) + \color{blue}{b \cdot c} \]
    8. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(-27, j \cdot \color{blue}{k}, b \cdot c\right) \]
      2. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, b \cdot c\right) \]
      3. lower-*.f6444.2

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, b \cdot c\right) \]
    9. Applied rewrites44.2%

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

    if -4.10000000000000037e-108 < x < 1.04999999999999991e-251

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      8. lower-*.f6476.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-4, a \cdot t, b \cdot c\right) \]
      3. lower-*.f6441.3

        \[\leadsto \mathsf{fma}\left(-4, a \cdot t, b \cdot c\right) \]
    12. Applied rewrites41.3%

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

Alternative 11: 58.3% accurate, 1.5× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} \mathbf{if}\;t \leq -1.15 \cdot 10^{-55}:\\ \;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-186}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 1.45 \cdot 10^{-63}:\\ \;\;\;\;\mathsf{fma}\left(-4, i \cdot x, b \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \mathsf{fma}\left(\left(18 \cdot x\right) \cdot z, y, a \cdot -4\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<= t -1.15e-55)
   (* t (fma -4.0 a (* 18.0 (* x (* y z)))))
   (if (<= t 6e-186)
     (- (* b c) (* 27.0 (* j k)))
     (if (<= t 1.45e-63)
       (fma -4.0 (* i x) (* b c))
       (* t (fma (* (* 18.0 x) z) y (* a -4.0)))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (t <= -1.15e-55) {
		tmp = t * fma(-4.0, a, (18.0 * (x * (y * z))));
	} else if (t <= 6e-186) {
		tmp = (b * c) - (27.0 * (j * k));
	} else if (t <= 1.45e-63) {
		tmp = fma(-4.0, (i * x), (b * c));
	} else {
		tmp = t * fma(((18.0 * x) * z), y, (a * -4.0));
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (t <= -1.15e-55)
		tmp = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z)))));
	elseif (t <= 6e-186)
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k)));
	elseif (t <= 1.45e-63)
		tmp = fma(-4.0, Float64(i * x), Float64(b * c));
	else
		tmp = Float64(t * fma(Float64(Float64(18.0 * x) * z), y, Float64(a * -4.0)));
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -1.15e-55], N[(t * N[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-186], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e-63], N[(-4.0 * N[(i * x), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[(18.0 * x), $MachinePrecision] * z), $MachinePrecision] * y + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{-55}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\

\mathbf{elif}\;t \leq 6 \cdot 10^{-186}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.15000000000000006e-55

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) \]
      5. lower-*.f6442.8

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

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

    if -1.15000000000000006e-55 < t < 6.0000000000000003e-186

    1. Initial program 85.3%

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

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

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

        \[\leadsto b \cdot c - \left(\color{blue}{4 \cdot \left(i \cdot x\right)} + 27 \cdot \left(j \cdot k\right)\right) \]
      3. lower-fma.f64N/A

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

        \[\leadsto b \cdot c - \mathsf{fma}\left(4, i \cdot \color{blue}{x}, 27 \cdot \left(j \cdot k\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto b \cdot c - \mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right) \]
      6. lower-*.f6460.8

        \[\leadsto b \cdot c - \mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right) \]
    4. Applied rewrites60.8%

      \[\leadsto \color{blue}{b \cdot c - \mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right)} \]
    5. Taylor expanded in x around 0

      \[\leadsto b \cdot c - 27 \cdot \color{blue}{\left(j \cdot k\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot c - 27 \cdot \left(j \cdot \color{blue}{k}\right) \]
      2. lower-*.f6444.2

        \[\leadsto b \cdot c - 27 \cdot \left(j \cdot k\right) \]
    7. Applied rewrites44.2%

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

    if 6.0000000000000003e-186 < t < 1.44999999999999987e-63

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      8. lower-*.f6476.6

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(-4, i \cdot x, b \cdot c\right) \]
    11. Step-by-step derivation
      1. lower-*.f6441.4

        \[\leadsto \mathsf{fma}\left(-4, i \cdot x, b \cdot c\right) \]
    12. Applied rewrites41.4%

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

    if 1.44999999999999987e-63 < t

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) \]
      5. lower-*.f6442.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \mathsf{fma}\left(\left(18 \cdot x\right) \cdot z, y, a \cdot -4\right) \]
      15. lower-*.f6443.6

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

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

Alternative 12: 58.1% accurate, 1.5× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{if}\;t \leq -1.15 \cdot 10^{-55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 6 \cdot 10^{-186}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;t \leq 0.68:\\ \;\;\;\;\mathsf{fma}\left(-4, i \cdot x, b \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* t (fma -4.0 a (* 18.0 (* x (* y z)))))))
   (if (<= t -1.15e-55)
     t_1
     (if (<= t 6e-186)
       (- (* b c) (* 27.0 (* j k)))
       (if (<= t 0.68) (fma -4.0 (* i x) (* b c)) t_1)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = t * fma(-4.0, a, (18.0 * (x * (y * z))));
	double tmp;
	if (t <= -1.15e-55) {
		tmp = t_1;
	} else if (t <= 6e-186) {
		tmp = (b * c) - (27.0 * (j * k));
	} else if (t <= 0.68) {
		tmp = fma(-4.0, (i * x), (b * c));
	} else {
		tmp = t_1;
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z)))))
	tmp = 0.0
	if (t <= -1.15e-55)
		tmp = t_1;
	elseif (t <= 6e-186)
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k)));
	elseif (t <= 0.68)
		tmp = fma(-4.0, Float64(i * x), Float64(b * c));
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e-55], t$95$1, If[LessEqual[t, 6e-186], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.68], N[(-4.0 * N[(i * x), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{-55}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 6 \cdot 10^{-186}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\

\mathbf{elif}\;t \leq 0.68:\\
\;\;\;\;\mathsf{fma}\left(-4, i \cdot x, b \cdot c\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.15000000000000006e-55 or 0.680000000000000049 < t

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) \]
      5. lower-*.f6442.8

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

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

    if -1.15000000000000006e-55 < t < 6.0000000000000003e-186

    1. Initial program 85.3%

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

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

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

        \[\leadsto b \cdot c - \left(\color{blue}{4 \cdot \left(i \cdot x\right)} + 27 \cdot \left(j \cdot k\right)\right) \]
      3. lower-fma.f64N/A

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

        \[\leadsto b \cdot c - \mathsf{fma}\left(4, i \cdot \color{blue}{x}, 27 \cdot \left(j \cdot k\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto b \cdot c - \mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right) \]
      6. lower-*.f6460.8

        \[\leadsto b \cdot c - \mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right) \]
    4. Applied rewrites60.8%

      \[\leadsto \color{blue}{b \cdot c - \mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right)} \]
    5. Taylor expanded in x around 0

      \[\leadsto b \cdot c - 27 \cdot \color{blue}{\left(j \cdot k\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot c - 27 \cdot \left(j \cdot \color{blue}{k}\right) \]
      2. lower-*.f6444.2

        \[\leadsto b \cdot c - 27 \cdot \left(j \cdot k\right) \]
    7. Applied rewrites44.2%

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

    if 6.0000000000000003e-186 < t < 0.680000000000000049

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      8. lower-*.f6476.6

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(-4, i \cdot x, b \cdot c\right) \]
    11. Step-by-step derivation
      1. lower-*.f6441.4

        \[\leadsto \mathsf{fma}\left(-4, i \cdot x, b \cdot c\right) \]
    12. Applied rewrites41.4%

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

Alternative 13: 54.1% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+133}:\\ \;\;\;\;\mathsf{fma}\left(-27, j \cdot k, b \cdot c\right)\\ \mathbf{elif}\;t\_1 \leq 10^{-234}:\\ \;\;\;\;\mathsf{fma}\left(-4, a \cdot t, b \cdot c\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+190}:\\ \;\;\;\;\mathsf{fma}\left(-4, i \cdot x, b \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* (* j 27.0) k)))
   (if (<= t_1 -5e+133)
     (fma -27.0 (* j k) (* b c))
     (if (<= t_1 1e-234)
       (fma -4.0 (* a t) (* b c))
       (if (<= t_1 1e+190)
         (fma -4.0 (* i x) (* b c))
         (- (* b c) (* 27.0 (* j k))))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (j * 27.0) * k;
	double tmp;
	if (t_1 <= -5e+133) {
		tmp = fma(-27.0, (j * k), (b * c));
	} else if (t_1 <= 1e-234) {
		tmp = fma(-4.0, (a * t), (b * c));
	} else if (t_1 <= 1e+190) {
		tmp = fma(-4.0, (i * x), (b * c));
	} else {
		tmp = (b * c) - (27.0 * (j * k));
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(j * 27.0) * k)
	tmp = 0.0
	if (t_1 <= -5e+133)
		tmp = fma(-27.0, Float64(j * k), Float64(b * c));
	elseif (t_1 <= 1e-234)
		tmp = fma(-4.0, Float64(a * t), Float64(b * c));
	elseif (t_1 <= 1e+190)
		tmp = fma(-4.0, Float64(i * x), Float64(b * c));
	else
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k)));
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+133], N[(-27.0 * N[(j * k), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-234], N[(-4.0 * N[(a * t), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+190], N[(-4.0 * N[(i * x), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+133}:\\
\;\;\;\;\mathsf{fma}\left(-27, j \cdot k, b \cdot c\right)\\

\mathbf{elif}\;t\_1 \leq 10^{-234}:\\
\;\;\;\;\mathsf{fma}\left(-4, a \cdot t, b \cdot c\right)\\

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

\mathbf{else}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.99999999999999961e133

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      8. lower-*.f6476.6

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

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

      \[\leadsto -27 \cdot \left(j \cdot k\right) + \color{blue}{b \cdot c} \]
    8. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(-27, j \cdot \color{blue}{k}, b \cdot c\right) \]
      2. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, b \cdot c\right) \]
      3. lower-*.f6444.2

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, b \cdot c\right) \]
    9. Applied rewrites44.2%

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

    if -4.99999999999999961e133 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.9999999999999996e-235

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      8. lower-*.f6476.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-4, a \cdot t, b \cdot c\right) \]
      3. lower-*.f6441.3

        \[\leadsto \mathsf{fma}\left(-4, a \cdot t, b \cdot c\right) \]
    12. Applied rewrites41.3%

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

    if 9.9999999999999996e-235 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.0000000000000001e190

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      8. lower-*.f6476.6

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(-4, i \cdot x, b \cdot c\right) \]
    11. Step-by-step derivation
      1. lower-*.f6441.4

        \[\leadsto \mathsf{fma}\left(-4, i \cdot x, b \cdot c\right) \]
    12. Applied rewrites41.4%

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

    if 1.0000000000000001e190 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    1. Initial program 85.3%

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

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

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

        \[\leadsto b \cdot c - \left(\color{blue}{4 \cdot \left(i \cdot x\right)} + 27 \cdot \left(j \cdot k\right)\right) \]
      3. lower-fma.f64N/A

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

        \[\leadsto b \cdot c - \mathsf{fma}\left(4, i \cdot \color{blue}{x}, 27 \cdot \left(j \cdot k\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto b \cdot c - \mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right) \]
      6. lower-*.f6460.8

        \[\leadsto b \cdot c - \mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right) \]
    4. Applied rewrites60.8%

      \[\leadsto \color{blue}{b \cdot c - \mathsf{fma}\left(4, i \cdot x, 27 \cdot \left(j \cdot k\right)\right)} \]
    5. Taylor expanded in x around 0

      \[\leadsto b \cdot c - 27 \cdot \color{blue}{\left(j \cdot k\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto b \cdot c - 27 \cdot \left(j \cdot \color{blue}{k}\right) \]
      2. lower-*.f6444.2

        \[\leadsto b \cdot c - 27 \cdot \left(j \cdot k\right) \]
    7. Applied rewrites44.2%

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

Alternative 14: 54.1% accurate, 1.1× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-27, j \cdot k, b \cdot c\right)\\ t_2 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+133}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{-234}:\\ \;\;\;\;\mathsf{fma}\left(-4, a \cdot t, b \cdot c\right)\\ \mathbf{elif}\;t\_2 \leq 10^{+190}:\\ \;\;\;\;\mathsf{fma}\left(-4, i \cdot x, b \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (fma -27.0 (* j k) (* b c))) (t_2 (* (* j 27.0) k)))
   (if (<= t_2 -5e+133)
     t_1
     (if (<= t_2 1e-234)
       (fma -4.0 (* a t) (* b c))
       (if (<= t_2 1e+190) (fma -4.0 (* i x) (* b c)) t_1)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = fma(-27.0, (j * k), (b * c));
	double t_2 = (j * 27.0) * k;
	double tmp;
	if (t_2 <= -5e+133) {
		tmp = t_1;
	} else if (t_2 <= 1e-234) {
		tmp = fma(-4.0, (a * t), (b * c));
	} else if (t_2 <= 1e+190) {
		tmp = fma(-4.0, (i * x), (b * c));
	} else {
		tmp = t_1;
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = fma(-27.0, Float64(j * k), Float64(b * c))
	t_2 = Float64(Float64(j * 27.0) * k)
	tmp = 0.0
	if (t_2 <= -5e+133)
		tmp = t_1;
	elseif (t_2 <= 1e-234)
		tmp = fma(-4.0, Float64(a * t), Float64(b * c));
	elseif (t_2 <= 1e+190)
		tmp = fma(-4.0, Float64(i * x), Float64(b * c));
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+133], t$95$1, If[LessEqual[t$95$2, 1e-234], N[(-4.0 * N[(a * t), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+190], N[(-4.0 * N[(i * x), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-27, j \cdot k, b \cdot c\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 10^{-234}:\\
\;\;\;\;\mathsf{fma}\left(-4, a \cdot t, b \cdot c\right)\\

\mathbf{elif}\;t\_2 \leq 10^{+190}:\\
\;\;\;\;\mathsf{fma}\left(-4, i \cdot x, b \cdot c\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.99999999999999961e133 or 1.0000000000000001e190 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      8. lower-*.f6476.6

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

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

      \[\leadsto -27 \cdot \left(j \cdot k\right) + \color{blue}{b \cdot c} \]
    8. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(-27, j \cdot \color{blue}{k}, b \cdot c\right) \]
      2. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, b \cdot c\right) \]
      3. lower-*.f6444.2

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, b \cdot c\right) \]
    9. Applied rewrites44.2%

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

    if -4.99999999999999961e133 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.9999999999999996e-235

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      8. lower-*.f6476.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-4, a \cdot t, b \cdot c\right) \]
      3. lower-*.f6441.3

        \[\leadsto \mathsf{fma}\left(-4, a \cdot t, b \cdot c\right) \]
    12. Applied rewrites41.3%

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

    if 9.9999999999999996e-235 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.0000000000000001e190

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      8. lower-*.f6476.6

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(-4, i \cdot x, b \cdot c\right) \]
    11. Step-by-step derivation
      1. lower-*.f6441.4

        \[\leadsto \mathsf{fma}\left(-4, i \cdot x, b \cdot c\right) \]
    12. Applied rewrites41.4%

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

Alternative 15: 53.4% accurate, 1.4× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-27, j \cdot k, b \cdot c\right)\\ t_2 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+133}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+227}:\\ \;\;\;\;\mathsf{fma}\left(-4, a \cdot t, b \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (fma -27.0 (* j k) (* b c))) (t_2 (* (* j 27.0) k)))
   (if (<= t_2 -5e+133)
     t_1
     (if (<= t_2 5e+227) (fma -4.0 (* a t) (* b c)) t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = fma(-27.0, (j * k), (b * c));
	double t_2 = (j * 27.0) * k;
	double tmp;
	if (t_2 <= -5e+133) {
		tmp = t_1;
	} else if (t_2 <= 5e+227) {
		tmp = fma(-4.0, (a * t), (b * c));
	} else {
		tmp = t_1;
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = fma(-27.0, Float64(j * k), Float64(b * c))
	t_2 = Float64(Float64(j * 27.0) * k)
	tmp = 0.0
	if (t_2 <= -5e+133)
		tmp = t_1;
	elseif (t_2 <= 5e+227)
		tmp = fma(-4.0, Float64(a * t), Float64(b * c));
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+133], t$95$1, If[LessEqual[t$95$2, 5e+227], N[(-4.0 * N[(a * t), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-27, j \cdot k, b \cdot c\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+227}:\\
\;\;\;\;\mathsf{fma}\left(-4, a \cdot t, b \cdot c\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.99999999999999961e133 or 4.9999999999999996e227 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      8. lower-*.f6476.6

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

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

      \[\leadsto -27 \cdot \left(j \cdot k\right) + \color{blue}{b \cdot c} \]
    8. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(-27, j \cdot \color{blue}{k}, b \cdot c\right) \]
      2. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, b \cdot c\right) \]
      3. lower-*.f6444.2

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, b \cdot c\right) \]
    9. Applied rewrites44.2%

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

    if -4.99999999999999961e133 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.9999999999999996e227

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      8. lower-*.f6476.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-4, a \cdot t, b \cdot c\right) \]
      3. lower-*.f6441.3

        \[\leadsto \mathsf{fma}\left(-4, a \cdot t, b \cdot c\right) \]
    12. Applied rewrites41.3%

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

Alternative 16: 47.4% accurate, 2.3× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := -4 \cdot \left(i \cdot x\right)\\ \mathbf{if}\;x \leq -1.2 \cdot 10^{+167}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{+78}:\\ \;\;\;\;\mathsf{fma}\left(-27, j \cdot k, b \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* -4.0 (* i x))))
   (if (<= x -1.2e+167)
     t_1
     (if (<= x 3.3e+78) (fma -27.0 (* j k) (* b c)) t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = -4.0 * (i * x);
	double tmp;
	if (x <= -1.2e+167) {
		tmp = t_1;
	} else if (x <= 3.3e+78) {
		tmp = fma(-27.0, (j * k), (b * c));
	} else {
		tmp = t_1;
	}
	return tmp;
}
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(-4.0 * Float64(i * x))
	tmp = 0.0
	if (x <= -1.2e+167)
		tmp = t_1;
	elseif (x <= 3.3e+78)
		tmp = fma(-27.0, Float64(j * k), Float64(b * c));
	else
		tmp = t_1;
	end
	return tmp
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(i * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.2e+167], t$95$1, If[LessEqual[x, 3.3e+78], N[(-27.0 * N[(j * k), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(i \cdot x\right)\\
\mathbf{if}\;x \leq -1.2 \cdot 10^{+167}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 3.3 \cdot 10^{+78}:\\
\;\;\;\;\mathsf{fma}\left(-27, j \cdot k, b \cdot c\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.19999999999999999e167 or 3.3e78 < x

    1. Initial program 85.3%

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

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

        \[\leadsto -4 \cdot \color{blue}{\left(i \cdot x\right)} \]
      2. lower-*.f6421.2

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

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

    if -1.19999999999999999e167 < x < 3.3e78

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, \mathsf{fma}\left(b, c, t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right) \]
      8. lower-*.f6476.6

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

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

      \[\leadsto -27 \cdot \left(j \cdot k\right) + \color{blue}{b \cdot c} \]
    8. Step-by-step derivation
      1. lower-fma.f64N/A

        \[\leadsto \mathsf{fma}\left(-27, j \cdot \color{blue}{k}, b \cdot c\right) \]
      2. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, b \cdot c\right) \]
      3. lower-*.f6444.2

        \[\leadsto \mathsf{fma}\left(-27, j \cdot k, b \cdot c\right) \]
    9. Applied rewrites44.2%

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

Alternative 17: 34.8% accurate, 1.2× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := -27 \cdot \left(j \cdot k\right)\\ t_2 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+133}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{-234}:\\ \;\;\;\;t \cdot \left(-4 \cdot a\right)\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+193}:\\ \;\;\;\;-4 \cdot \left(i \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* -27.0 (* j k))) (t_2 (* (* j 27.0) k)))
   (if (<= t_2 -5e+133)
     t_1
     (if (<= t_2 1e-234)
       (* t (* -4.0 a))
       (if (<= t_2 5e+193) (* -4.0 (* i x)) t_1)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = -27.0 * (j * k);
	double t_2 = (j * 27.0) * k;
	double tmp;
	if (t_2 <= -5e+133) {
		tmp = t_1;
	} else if (t_2 <= 1e-234) {
		tmp = t * (-4.0 * a);
	} else if (t_2 <= 5e+193) {
		tmp = -4.0 * (i * x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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, k)
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), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (-27.0d0) * (j * k)
    t_2 = (j * 27.0d0) * k
    if (t_2 <= (-5d+133)) then
        tmp = t_1
    else if (t_2 <= 1d-234) then
        tmp = t * ((-4.0d0) * a)
    else if (t_2 <= 5d+193) then
        tmp = (-4.0d0) * (i * x)
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = -27.0 * (j * k);
	double t_2 = (j * 27.0) * k;
	double tmp;
	if (t_2 <= -5e+133) {
		tmp = t_1;
	} else if (t_2 <= 1e-234) {
		tmp = t * (-4.0 * a);
	} else if (t_2 <= 5e+193) {
		tmp = -4.0 * (i * x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = -27.0 * (j * k)
	t_2 = (j * 27.0) * k
	tmp = 0
	if t_2 <= -5e+133:
		tmp = t_1
	elif t_2 <= 1e-234:
		tmp = t * (-4.0 * a)
	elif t_2 <= 5e+193:
		tmp = -4.0 * (i * x)
	else:
		tmp = t_1
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(-27.0 * Float64(j * k))
	t_2 = Float64(Float64(j * 27.0) * k)
	tmp = 0.0
	if (t_2 <= -5e+133)
		tmp = t_1;
	elseif (t_2 <= 1e-234)
		tmp = Float64(t * Float64(-4.0 * a));
	elseif (t_2 <= 5e+193)
		tmp = Float64(-4.0 * Float64(i * x));
	else
		tmp = t_1;
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = -27.0 * (j * k);
	t_2 = (j * 27.0) * k;
	tmp = 0.0;
	if (t_2 <= -5e+133)
		tmp = t_1;
	elseif (t_2 <= 1e-234)
		tmp = t * (-4.0 * a);
	elseif (t_2 <= 5e+193)
		tmp = -4.0 * (i * x);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+133], t$95$1, If[LessEqual[t$95$2, 1e-234], N[(t * N[(-4.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+193], N[(-4.0 * N[(i * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 10^{-234}:\\
\;\;\;\;t \cdot \left(-4 \cdot a\right)\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+193}:\\
\;\;\;\;-4 \cdot \left(i \cdot x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.99999999999999961e133 or 4.99999999999999972e193 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    1. Initial program 85.3%

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -27 \cdot \color{blue}{\left(j \cdot k\right)} \]
      2. lower-*.f6424.0

        \[\leadsto -27 \cdot \left(j \cdot \color{blue}{k}\right) \]
    4. Applied rewrites24.0%

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]

    if -4.99999999999999961e133 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.9999999999999996e-235

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) \]
      5. lower-*.f6442.8

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

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

      \[\leadsto t \cdot \left(-4 \cdot \color{blue}{a}\right) \]
    8. Step-by-step derivation
      1. lower-*.f6421.1

        \[\leadsto t \cdot \left(-4 \cdot a\right) \]
    9. Applied rewrites21.1%

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

    if 9.9999999999999996e-235 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.99999999999999972e193

    1. Initial program 85.3%

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

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

        \[\leadsto -4 \cdot \color{blue}{\left(i \cdot x\right)} \]
      2. lower-*.f6421.2

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

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

Alternative 18: 34.2% accurate, 1.7× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ \begin{array}{l} t_1 := -27 \cdot \left(j \cdot k\right)\\ t_2 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+133}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+227}:\\ \;\;\;\;t \cdot \left(-4 \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* -27.0 (* j k))) (t_2 (* (* j 27.0) k)))
   (if (<= t_2 -5e+133) t_1 (if (<= t_2 5e+227) (* t (* -4.0 a)) t_1))))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = -27.0 * (j * k);
	double t_2 = (j * 27.0) * k;
	double tmp;
	if (t_2 <= -5e+133) {
		tmp = t_1;
	} else if (t_2 <= 5e+227) {
		tmp = t * (-4.0 * a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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, k)
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), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (-27.0d0) * (j * k)
    t_2 = (j * 27.0d0) * k
    if (t_2 <= (-5d+133)) then
        tmp = t_1
    else if (t_2 <= 5d+227) then
        tmp = t * ((-4.0d0) * a)
    else
        tmp = t_1
    end if
    code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = -27.0 * (j * k);
	double t_2 = (j * 27.0) * k;
	double tmp;
	if (t_2 <= -5e+133) {
		tmp = t_1;
	} else if (t_2 <= 5e+227) {
		tmp = t * (-4.0 * a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = -27.0 * (j * k)
	t_2 = (j * 27.0) * k
	tmp = 0
	if t_2 <= -5e+133:
		tmp = t_1
	elif t_2 <= 5e+227:
		tmp = t * (-4.0 * a)
	else:
		tmp = t_1
	return tmp
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(-27.0 * Float64(j * k))
	t_2 = Float64(Float64(j * 27.0) * k)
	tmp = 0.0
	if (t_2 <= -5e+133)
		tmp = t_1;
	elseif (t_2 <= 5e+227)
		tmp = Float64(t * Float64(-4.0 * a));
	else
		tmp = t_1;
	end
	return tmp
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = -27.0 * (j * k);
	t_2 = (j * 27.0) * k;
	tmp = 0.0;
	if (t_2 <= -5e+133)
		tmp = t_1;
	elseif (t_2 <= 5e+227)
		tmp = t * (-4.0 * a);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+133], t$95$1, If[LessEqual[t$95$2, 5e+227], N[(t * N[(-4.0 * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+227}:\\
\;\;\;\;t \cdot \left(-4 \cdot a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.99999999999999961e133 or 4.9999999999999996e227 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    1. Initial program 85.3%

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto -27 \cdot \color{blue}{\left(j \cdot k\right)} \]
      2. lower-*.f6424.0

        \[\leadsto -27 \cdot \left(j \cdot \color{blue}{k}\right) \]
    4. Applied rewrites24.0%

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]

    if -4.99999999999999961e133 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.9999999999999996e227

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
      2. sub-flipN/A

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      11. metadata-eval86.5

        \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
      13. sub-flipN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
    3. Applied rewrites90.9%

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

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

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

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

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

        \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) \]
      5. lower-*.f6442.8

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

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

      \[\leadsto t \cdot \left(-4 \cdot \color{blue}{a}\right) \]
    8. Step-by-step derivation
      1. lower-*.f6421.1

        \[\leadsto t \cdot \left(-4 \cdot a\right) \]
    9. Applied rewrites21.1%

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

Alternative 19: 21.1% accurate, 6.4× speedup?

\[\begin{array}{l} [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\ [x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\ \\ t \cdot \left(-4 \cdot a\right) \end{array} \]
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k) :precision binary64 (* t (* -4.0 a)))
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
assert(x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return t * (-4.0 * a);
}
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
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, k)
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), intent (in) :: k
    code = t * ((-4.0d0) * a)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
assert x < y && y < z && z < t && t < a && a < b && b < c && c < i && i < j && j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return t * (-4.0 * a);
}
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
[x, y, z, t, a, b, c, i, j, k] = sort([x, y, z, t, a, b, c, i, j, k])
def code(x, y, z, t, a, b, c, i, j, k):
	return t * (-4.0 * a)
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
x, y, z, t, a, b, c, i, j, k = sort([x, y, z, t, a, b, c, i, j, k])
function code(x, y, z, t, a, b, c, i, j, k)
	return Float64(t * Float64(-4.0 * a))
end
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
x, y, z, t, a, b, c, i, j, k = num2cell(sort([x, y, z, t, a, b, c, i, j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
	tmp = t * (-4.0 * a);
end
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, b, c, i, j, and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(t * N[(-4.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\\\
[x, y, z, t, a, b, c, i, j, k] = \mathsf{sort}([x, y, z, t, a, b, c, i, j, k])\\
\\
t \cdot \left(-4 \cdot a\right)
\end{array}
Derivation
  1. Initial program 85.3%

    \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
  2. Step-by-step derivation
    1. lift--.f64N/A

      \[\leadsto \color{blue}{\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k} \]
    2. sub-flipN/A

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(j \cdot 27\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right)} \]
    7. lift-*.f64N/A

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

      \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{27 \cdot j}\right), k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
    9. distribute-lft-neg-inN/A

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

      \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(27\right)\right) \cdot j}, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
    11. metadata-eval86.5

      \[\leadsto \mathsf{fma}\left(\color{blue}{-27} \cdot j, k, \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) \]
    12. lift--.f64N/A

      \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i}\right) \]
    13. sub-flipN/A

      \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) + \left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right)}\right) \]
    14. +-commutativeN/A

      \[\leadsto \mathsf{fma}\left(-27 \cdot j, k, \color{blue}{\left(\mathsf{neg}\left(\left(x \cdot 4\right) \cdot i\right)\right) + \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right)}\right) \]
  3. Applied rewrites90.9%

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

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

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

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

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

      \[\leadsto t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) \]
    5. lower-*.f6442.8

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

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

    \[\leadsto t \cdot \left(-4 \cdot \color{blue}{a}\right) \]
  8. Step-by-step derivation
    1. lower-*.f6421.1

      \[\leadsto t \cdot \left(-4 \cdot a\right) \]
  9. Applied rewrites21.1%

    \[\leadsto t \cdot \left(-4 \cdot \color{blue}{a}\right) \]
  10. Add Preprocessing

Reproduce

?
herbie shell --seed 2025156 
(FPCore (x y z t a b c i j k)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, E"
  :precision binary64
  (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))