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

Percentage Accurate: 84.9% → 89.6%
Time: 12.7s
Alternatives: 21
Speedup: 0.5×

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}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 alternatives:

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

Initial Program: 84.9% 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: 89.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;\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) - t\_1 \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(t \cdot \left(18 \cdot x\right), z \cdot y, \mathsf{fma}\left(-4 \cdot a, t, \mathsf{fma}\left(c, b, \left(-4 \cdot x\right) \cdot i\right)\right)\right) - t\_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(t \cdot y\right) \cdot z, 18, -4 \cdot i\right) \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* (* j 27.0) k)))
   (if (<=
        (-
         (-
          (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c))
          (* (* x 4.0) i))
         t_1)
        INFINITY)
     (-
      (fma
       (* t (* 18.0 x))
       (* z y)
       (fma (* -4.0 a) t (fma c b (* (* -4.0 x) i))))
      t_1)
     (* (fma (* (* t y) z) 18.0 (* -4.0 i)) x))))
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 (((((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - t_1) <= ((double) INFINITY)) {
		tmp = fma((t * (18.0 * x)), (z * y), fma((-4.0 * a), t, fma(c, b, ((-4.0 * x) * i)))) - t_1;
	} else {
		tmp = fma(((t * y) * z), 18.0, (-4.0 * i)) * x;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(j * 27.0) * k)
	tmp = 0.0
	if (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)) - t_1) <= Inf)
		tmp = Float64(fma(Float64(t * Float64(18.0 * x)), Float64(z * y), fma(Float64(-4.0 * a), t, fma(c, b, Float64(Float64(-4.0 * x) * i)))) - t_1);
	else
		tmp = Float64(fma(Float64(Float64(t * y) * z), 18.0, Float64(-4.0 * i)) * x);
	end
	return tmp
end
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[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] - t$95$1), $MachinePrecision], Infinity], N[(N[(N[(t * N[(18.0 * x), $MachinePrecision]), $MachinePrecision] * N[(z * y), $MachinePrecision] + N[(N[(-4.0 * a), $MachinePrecision] * t + N[(c * b + N[(N[(-4.0 * x), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(N[(t * y), $MachinePrecision] * z), $MachinePrecision] * 18.0 + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;\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) - t\_1 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(t \cdot \left(18 \cdot x\right), z \cdot y, \mathsf{fma}\left(-4 \cdot a, t, \mathsf{fma}\left(c, b, \left(-4 \cdot x\right) \cdot i\right)\right)\right) - t\_1\\

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


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

    1. Initial program 94.9%

      \[\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. Add Preprocessing
    3. 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. lift-*.f64N/A

        \[\leadsto \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \color{blue}{\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 \]
      6. fp-cancel-sub-sign-invN/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(a \cdot 4\right)\right) \cdot t\right)} + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k \]
      7. 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(a \cdot 4\right)\right) \cdot t + \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(a \cdot 4\right)\right) \cdot t + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      9. *-commutativeN/A

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

        \[\leadsto \left(t \cdot \left(\color{blue}{\left(\left(x \cdot 18\right) \cdot y\right)} \cdot z\right) + \left(\left(\mathsf{neg}\left(a \cdot 4\right)\right) \cdot t + \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(t \cdot \color{blue}{\left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right)} + \left(\left(\mathsf{neg}\left(a \cdot 4\right)\right) \cdot t + \left(b \cdot c - \left(x \cdot 4\right) \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      13. associate-*r*N/A

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot \left(18 \cdot x\right), z \cdot y, \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 \]

    if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k))

    1. Initial program 0.0%

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

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

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

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
      3. lower-*.f6419.0

        \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
    5. Applied rewrites19.0%

      \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
    6. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    7. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

        \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot i\right)} \]
      2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y \cdot z\right) \cdot t, 18, -4 \cdot i\right) \cdot x} \]
    9. Step-by-step derivation
      1. Applied rewrites75.2%

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

    Alternative 2: 92.0% accurate, 0.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\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 \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(z, y \cdot \left(18 \cdot x\right), -4 \cdot a\right) \cdot t - \mathsf{fma}\left(k, 27 \cdot j, i \cdot \left(4 \cdot x\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(t \cdot y\right) \cdot z, 18, -4 \cdot i\right) \cdot x\\ \end{array} \end{array} \]
    (FPCore (x y z t a b c i j k)
     :precision binary64
     (if (<=
          (-
           (-
            (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c))
            (* (* x 4.0) i))
           (* (* j 27.0) k))
          INFINITY)
       (fma
        c
        b
        (-
         (* (fma z (* y (* 18.0 x)) (* -4.0 a)) t)
         (fma k (* 27.0 j) (* i (* 4.0 x)))))
       (* (fma (* (* t y) z) 18.0 (* -4.0 i)) x)))
    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 * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= ((double) INFINITY)) {
    		tmp = fma(c, b, ((fma(z, (y * (18.0 * x)), (-4.0 * a)) * t) - fma(k, (27.0 * j), (i * (4.0 * x)))));
    	} else {
    		tmp = fma(((t * y) * z), 18.0, (-4.0 * i)) * x;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b, c, i, j, k)
    	tmp = 0.0
    	if (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)) <= Inf)
    		tmp = fma(c, b, Float64(Float64(fma(z, Float64(y * Float64(18.0 * x)), Float64(-4.0 * a)) * t) - fma(k, Float64(27.0 * j), Float64(i * Float64(4.0 * x)))));
    	else
    		tmp = Float64(fma(Float64(Float64(t * y) * z), 18.0, Float64(-4.0 * i)) * x);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[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], Infinity], N[(c * b + N[(N[(N[(z * N[(y * N[(18.0 * x), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] - N[(k * N[(27.0 * j), $MachinePrecision] + N[(i * N[(4.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(t * y), $MachinePrecision] * z), $MachinePrecision] * 18.0 + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;\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 \leq \infty:\\
    \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(z, y \cdot \left(18 \cdot x\right), -4 \cdot a\right) \cdot t - \mathsf{fma}\left(k, 27 \cdot j, i \cdot \left(4 \cdot x\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(\left(t \cdot y\right) \cdot z, 18, -4 \cdot i\right) \cdot x\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0

      1. Initial program 94.9%

        \[\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. Add Preprocessing
      3. 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 \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 \]
        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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)} \]
        4. lift-+.f64N/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) + b \cdot c\right)} - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right) \]
        5. +-commutativeN/A

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

          \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
        7. lift-*.f64N/A

          \[\leadsto \color{blue}{b \cdot c} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
        8. *-commutativeN/A

          \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
        9. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
        10. lower--.f64N/A

          \[\leadsto \mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)}\right) \]
      4. Applied rewrites94.9%

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

      if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k))

      1. Initial program 0.0%

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

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

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

          \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
        3. lower-*.f6419.0

          \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
      5. Applied rewrites19.0%

        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
      6. Taylor expanded in x around inf

        \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
      7. Step-by-step derivation
        1. fp-cancel-sub-sign-invN/A

          \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot i\right)} \]
        2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y \cdot z\right) \cdot t, 18, -4 \cdot i\right) \cdot x} \]
      9. Step-by-step derivation
        1. Applied rewrites75.2%

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

      Alternative 3: 92.0% accurate, 0.5× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\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 \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(\mathsf{fma}\left(z, y \cdot \left(18 \cdot x\right), -4 \cdot a\right), t, \mathsf{fma}\left(c, b, \left(-4 \cdot x\right) \cdot i\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(t \cdot y\right) \cdot z, 18, -4 \cdot i\right) \cdot x\\ \end{array} \end{array} \]
      (FPCore (x y z t a b c i j k)
       :precision binary64
       (if (<=
            (-
             (-
              (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c))
              (* (* x 4.0) i))
             (* (* j 27.0) k))
            INFINITY)
         (fma
          (* -27.0 j)
          k
          (fma (fma z (* y (* 18.0 x)) (* -4.0 a)) t (fma c b (* (* -4.0 x) i))))
         (* (fma (* (* t y) z) 18.0 (* -4.0 i)) x)))
      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 * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= ((double) INFINITY)) {
      		tmp = fma((-27.0 * j), k, fma(fma(z, (y * (18.0 * x)), (-4.0 * a)), t, fma(c, b, ((-4.0 * x) * i))));
      	} else {
      		tmp = fma(((t * y) * z), 18.0, (-4.0 * i)) * x;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b, c, i, j, k)
      	tmp = 0.0
      	if (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)) <= Inf)
      		tmp = fma(Float64(-27.0 * j), k, fma(fma(z, Float64(y * Float64(18.0 * x)), Float64(-4.0 * a)), t, fma(c, b, Float64(Float64(-4.0 * x) * i))));
      	else
      		tmp = Float64(fma(Float64(Float64(t * y) * z), 18.0, Float64(-4.0 * i)) * x);
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[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], Infinity], N[(N[(-27.0 * j), $MachinePrecision] * k + N[(N[(z * N[(y * N[(18.0 * x), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] * t + N[(c * b + N[(N[(-4.0 * x), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(t * y), $MachinePrecision] * z), $MachinePrecision] * 18.0 + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;\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 \leq \infty:\\
      \;\;\;\;\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(\mathsf{fma}\left(z, y \cdot \left(18 \cdot x\right), -4 \cdot a\right), t, \mathsf{fma}\left(c, b, \left(-4 \cdot x\right) \cdot i\right)\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(\left(t \cdot y\right) \cdot z, 18, -4 \cdot i\right) \cdot x\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0

        1. Initial program 94.9%

          \[\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. Add Preprocessing
        3. Applied rewrites94.9%

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

        if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k))

        1. Initial program 0.0%

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

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

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

            \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
          3. lower-*.f6419.0

            \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
        5. Applied rewrites19.0%

          \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
        6. Taylor expanded in x around inf

          \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
        7. Step-by-step derivation
          1. fp-cancel-sub-sign-invN/A

            \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot i\right)} \]
          2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y \cdot z\right) \cdot t, 18, -4 \cdot i\right) \cdot x} \]
        9. Step-by-step derivation
          1. Applied rewrites75.2%

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

        Alternative 4: 53.7% accurate, 0.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-4 \cdot t, a, -27 \cdot \left(k \cdot j\right)\right)\\ t_2 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+173}:\\ \;\;\;\;\mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{+16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-80}:\\ \;\;\;\;\left(\left(y \cdot 18\right) \cdot \left(x \cdot z\right)\right) \cdot t\\ \mathbf{elif}\;t\_2 \leq 10^{+70}:\\ \;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, b \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t a b c i j k)
         :precision binary64
         (let* ((t_1 (fma (* -4.0 t) a (* -27.0 (* k j)))) (t_2 (* (* j 27.0) k)))
           (if (<= t_2 -2e+173)
             (fma c b (* -27.0 (* j k)))
             (if (<= t_2 -2e+16)
               t_1
               (if (<= t_2 -5e-80)
                 (* (* (* y 18.0) (* x z)) t)
                 (if (<= t_2 1e+70) (fma (* -4.0 a) t (* b c)) t_1))))))
        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((-4.0 * t), a, (-27.0 * (k * j)));
        	double t_2 = (j * 27.0) * k;
        	double tmp;
        	if (t_2 <= -2e+173) {
        		tmp = fma(c, b, (-27.0 * (j * k)));
        	} else if (t_2 <= -2e+16) {
        		tmp = t_1;
        	} else if (t_2 <= -5e-80) {
        		tmp = ((y * 18.0) * (x * z)) * t;
        	} else if (t_2 <= 1e+70) {
        		tmp = fma((-4.0 * a), t, (b * c));
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b, c, i, j, k)
        	t_1 = fma(Float64(-4.0 * t), a, Float64(-27.0 * Float64(k * j)))
        	t_2 = Float64(Float64(j * 27.0) * k)
        	tmp = 0.0
        	if (t_2 <= -2e+173)
        		tmp = fma(c, b, Float64(-27.0 * Float64(j * k)));
        	elseif (t_2 <= -2e+16)
        		tmp = t_1;
        	elseif (t_2 <= -5e-80)
        		tmp = Float64(Float64(Float64(y * 18.0) * Float64(x * z)) * t);
        	elseif (t_2 <= 1e+70)
        		tmp = fma(Float64(-4.0 * a), t, Float64(b * c));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(-4.0 * t), $MachinePrecision] * a + N[(-27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+173], N[(c * b + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -2e+16], t$95$1, If[LessEqual[t$95$2, -5e-80], N[(N[(N[(y * 18.0), $MachinePrecision] * N[(x * z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t$95$2, 1e+70], N[(N[(-4.0 * a), $MachinePrecision] * t + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \mathsf{fma}\left(-4 \cdot t, a, -27 \cdot \left(k \cdot j\right)\right)\\
        t_2 := \left(j \cdot 27\right) \cdot k\\
        \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+173}:\\
        \;\;\;\;\mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\
        
        \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{+16}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-80}:\\
        \;\;\;\;\left(\left(y \cdot 18\right) \cdot \left(x \cdot z\right)\right) \cdot t\\
        
        \mathbf{elif}\;t\_2 \leq 10^{+70}:\\
        \;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, b \cdot c\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2e173

          1. Initial program 78.7%

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

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

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

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

              \[\leadsto \color{blue}{\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right)} - 27 \cdot \left(j \cdot k\right) \]
            4. metadata-evalN/A

              \[\leadsto \left(b \cdot c + \color{blue}{-4} \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right) \]
            5. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto b \cdot c - \color{blue}{27 \cdot \left(j \cdot k\right)} \]
          7. Step-by-step derivation
            1. Applied rewrites67.2%

              \[\leadsto \mathsf{fma}\left(-27, \color{blue}{k \cdot j}, b \cdot c\right) \]
            2. Step-by-step derivation
              1. Applied rewrites69.6%

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

              if -2e173 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2e16 or 1.00000000000000007e70 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

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

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

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

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

                  \[\leadsto \color{blue}{\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right)} - 27 \cdot \left(j \cdot k\right) \]
                4. metadata-evalN/A

                  \[\leadsto \left(b \cdot c + \color{blue}{-4} \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right) \]
                5. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto b \cdot c - \color{blue}{27 \cdot \left(j \cdot k\right)} \]
              7. Step-by-step derivation
                1. Applied rewrites48.7%

                  \[\leadsto \mathsf{fma}\left(-27, \color{blue}{k \cdot j}, b \cdot c\right) \]
                2. Step-by-step derivation
                  1. Applied rewrites48.7%

                    \[\leadsto \mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right) \]
                  2. Taylor expanded in b around 0

                    \[\leadsto -4 \cdot \left(a \cdot t\right) - \color{blue}{27 \cdot \left(j \cdot k\right)} \]
                  3. Step-by-step derivation
                    1. Applied rewrites63.0%

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

                    if -2e16 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5e-80

                    1. Initial program 84.1%

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

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

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

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

                        \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                    5. Applied rewrites6.2%

                      \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                    6. Taylor expanded in t around inf

                      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
                    7. Step-by-step derivation
                      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) \cdot t \]
                    10. Step-by-step derivation
                      1. Applied rewrites58.2%

                        \[\leadsto \left(\left(\left(y \cdot z\right) \cdot x\right) \cdot 18\right) \cdot t \]
                      2. Step-by-step derivation
                        1. Applied rewrites61.8%

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

                        if -5e-80 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000007e70

                        1. Initial program 89.1%

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

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

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

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

                            \[\leadsto \color{blue}{\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right)} - 27 \cdot \left(j \cdot k\right) \]
                          4. metadata-evalN/A

                            \[\leadsto \left(b \cdot c + \color{blue}{-4} \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right) \]
                          5. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto b \cdot c - \color{blue}{27 \cdot \left(j \cdot k\right)} \]
                        7. Step-by-step derivation
                          1. Applied rewrites34.0%

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

                            \[\leadsto -4 \cdot \left(a \cdot t\right) + \color{blue}{b \cdot c} \]
                          3. Step-by-step derivation
                            1. Applied rewrites55.5%

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

                          Alternative 5: 35.6% accurate, 0.9× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-4 \cdot a\right) \cdot t\\ t_2 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+93}:\\ \;\;\;\;\left(k \cdot -27\right) \cdot j\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-220}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\left(-4 \cdot x\right) \cdot i\\ \mathbf{elif}\;t\_2 \leq 500000000:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(-27 \cdot j\right) \cdot k\\ \end{array} \end{array} \]
                          (FPCore (x y z t a b c i j k)
                           :precision binary64
                           (let* ((t_1 (* (* -4.0 a) t)) (t_2 (* (* j 27.0) k)))
                             (if (<= t_2 -2e+93)
                               (* (* k -27.0) j)
                               (if (<= t_2 -5e-220)
                                 t_1
                                 (if (<= t_2 0.0)
                                   (* (* -4.0 x) i)
                                   (if (<= t_2 500000000.0) t_1 (* (* -27.0 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 * a) * t;
                          	double t_2 = (j * 27.0) * k;
                          	double tmp;
                          	if (t_2 <= -2e+93) {
                          		tmp = (k * -27.0) * j;
                          	} else if (t_2 <= -5e-220) {
                          		tmp = t_1;
                          	} else if (t_2 <= 0.0) {
                          		tmp = (-4.0 * x) * i;
                          	} else if (t_2 <= 500000000.0) {
                          		tmp = t_1;
                          	} else {
                          		tmp = (-27.0 * j) * k;
                          	}
                          	return tmp;
                          }
                          
                          module fmin_fmax_functions
                              implicit none
                              private
                              public fmax
                              public fmin
                          
                              interface fmax
                                  module procedure fmax88
                                  module procedure fmax44
                                  module procedure fmax84
                                  module procedure fmax48
                              end interface
                              interface fmin
                                  module procedure fmin88
                                  module procedure fmin44
                                  module procedure fmin84
                                  module procedure fmin48
                              end interface
                          contains
                              real(8) function fmax88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmax44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmax84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmax48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                              end function
                              real(8) function fmin88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmin44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmin84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmin48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                              end function
                          end module
                          
                          real(8) function code(x, y, z, t, a, b, c, i, j, 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 = ((-4.0d0) * a) * t
                              t_2 = (j * 27.0d0) * k
                              if (t_2 <= (-2d+93)) then
                                  tmp = (k * (-27.0d0)) * j
                              else if (t_2 <= (-5d-220)) then
                                  tmp = t_1
                              else if (t_2 <= 0.0d0) then
                                  tmp = ((-4.0d0) * x) * i
                              else if (t_2 <= 500000000.0d0) then
                                  tmp = t_1
                              else
                                  tmp = ((-27.0d0) * j) * k
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
                          	double t_1 = (-4.0 * a) * t;
                          	double t_2 = (j * 27.0) * k;
                          	double tmp;
                          	if (t_2 <= -2e+93) {
                          		tmp = (k * -27.0) * j;
                          	} else if (t_2 <= -5e-220) {
                          		tmp = t_1;
                          	} else if (t_2 <= 0.0) {
                          		tmp = (-4.0 * x) * i;
                          	} else if (t_2 <= 500000000.0) {
                          		tmp = t_1;
                          	} else {
                          		tmp = (-27.0 * j) * k;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a, b, c, i, j, k):
                          	t_1 = (-4.0 * a) * t
                          	t_2 = (j * 27.0) * k
                          	tmp = 0
                          	if t_2 <= -2e+93:
                          		tmp = (k * -27.0) * j
                          	elif t_2 <= -5e-220:
                          		tmp = t_1
                          	elif t_2 <= 0.0:
                          		tmp = (-4.0 * x) * i
                          	elif t_2 <= 500000000.0:
                          		tmp = t_1
                          	else:
                          		tmp = (-27.0 * j) * k
                          	return tmp
                          
                          function code(x, y, z, t, a, b, c, i, j, k)
                          	t_1 = Float64(Float64(-4.0 * a) * t)
                          	t_2 = Float64(Float64(j * 27.0) * k)
                          	tmp = 0.0
                          	if (t_2 <= -2e+93)
                          		tmp = Float64(Float64(k * -27.0) * j);
                          	elseif (t_2 <= -5e-220)
                          		tmp = t_1;
                          	elseif (t_2 <= 0.0)
                          		tmp = Float64(Float64(-4.0 * x) * i);
                          	elseif (t_2 <= 500000000.0)
                          		tmp = t_1;
                          	else
                          		tmp = Float64(Float64(-27.0 * j) * k);
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
                          	t_1 = (-4.0 * a) * t;
                          	t_2 = (j * 27.0) * k;
                          	tmp = 0.0;
                          	if (t_2 <= -2e+93)
                          		tmp = (k * -27.0) * j;
                          	elseif (t_2 <= -5e-220)
                          		tmp = t_1;
                          	elseif (t_2 <= 0.0)
                          		tmp = (-4.0 * x) * i;
                          	elseif (t_2 <= 500000000.0)
                          		tmp = t_1;
                          	else
                          		tmp = (-27.0 * j) * k;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(-4.0 * a), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+93], N[(N[(k * -27.0), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[t$95$2, -5e-220], t$95$1, If[LessEqual[t$95$2, 0.0], N[(N[(-4.0 * x), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[t$95$2, 500000000.0], t$95$1, N[(N[(-27.0 * j), $MachinePrecision] * k), $MachinePrecision]]]]]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := \left(-4 \cdot a\right) \cdot t\\
                          t_2 := \left(j \cdot 27\right) \cdot k\\
                          \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+93}:\\
                          \;\;\;\;\left(k \cdot -27\right) \cdot j\\
                          
                          \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-220}:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{elif}\;t\_2 \leq 0:\\
                          \;\;\;\;\left(-4 \cdot x\right) \cdot i\\
                          
                          \mathbf{elif}\;t\_2 \leq 500000000:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\left(-27 \cdot j\right) \cdot k\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 4 regimes
                          2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.00000000000000009e93

                            1. Initial program 79.4%

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

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

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

                                \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                              3. lower-*.f6452.3

                                \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                            5. Applied rewrites52.3%

                              \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                            6. Step-by-step derivation
                              1. Applied rewrites52.3%

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

                              if -2.00000000000000009e93 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.0000000000000002e-220 or 0.0 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 5e8

                              1. Initial program 90.1%

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

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

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

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

                                  \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                              5. Applied rewrites5.2%

                                \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                              6. Taylor expanded in t around inf

                                \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
                              7. Step-by-step derivation
                                1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \left(-4 \cdot a\right) \cdot t \]
                              10. Step-by-step derivation
                                1. Applied rewrites37.6%

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

                                if -5.0000000000000002e-220 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 0.0

                                1. Initial program 83.4%

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

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

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

                                    \[\leadsto \color{blue}{\left(-4 \cdot x\right) \cdot i} \]
                                  3. lower-*.f64N/A

                                    \[\leadsto \color{blue}{\left(-4 \cdot x\right) \cdot i} \]
                                  4. lower-*.f6432.4

                                    \[\leadsto \color{blue}{\left(-4 \cdot x\right)} \cdot i \]
                                5. Applied rewrites32.4%

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

                                if 5e8 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

                                1. Initial program 80.0%

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

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

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

                                    \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                  3. lower-*.f6453.9

                                    \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                                5. Applied rewrites53.9%

                                  \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                              11. Recombined 4 regimes into one program.
                              12. Add Preprocessing

                              Alternative 6: 35.6% accurate, 0.9× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-27 \cdot j\right) \cdot k\\ t_2 := \left(-4 \cdot a\right) \cdot t\\ t_3 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_3 \leq -2 \cdot 10^{+93}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-220}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_3 \leq 0:\\ \;\;\;\;\left(-4 \cdot x\right) \cdot i\\ \mathbf{elif}\;t\_3 \leq 500000000:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                              (FPCore (x y z t a b c i j k)
                               :precision binary64
                               (let* ((t_1 (* (* -27.0 j) k)) (t_2 (* (* -4.0 a) t)) (t_3 (* (* j 27.0) k)))
                                 (if (<= t_3 -2e+93)
                                   t_1
                                   (if (<= t_3 -5e-220)
                                     t_2
                                     (if (<= t_3 0.0) (* (* -4.0 x) i) (if (<= t_3 500000000.0) t_2 t_1))))))
                              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 = (-4.0 * a) * t;
                              	double t_3 = (j * 27.0) * k;
                              	double tmp;
                              	if (t_3 <= -2e+93) {
                              		tmp = t_1;
                              	} else if (t_3 <= -5e-220) {
                              		tmp = t_2;
                              	} else if (t_3 <= 0.0) {
                              		tmp = (-4.0 * x) * i;
                              	} else if (t_3 <= 500000000.0) {
                              		tmp = t_2;
                              	} else {
                              		tmp = t_1;
                              	}
                              	return tmp;
                              }
                              
                              module fmin_fmax_functions
                                  implicit none
                                  private
                                  public fmax
                                  public fmin
                              
                                  interface fmax
                                      module procedure fmax88
                                      module procedure fmax44
                                      module procedure fmax84
                                      module procedure fmax48
                                  end interface
                                  interface fmin
                                      module procedure fmin88
                                      module procedure fmin44
                                      module procedure fmin84
                                      module procedure fmin48
                                  end interface
                              contains
                                  real(8) function fmax88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmax44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmax84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmax48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmin44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmin48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                  end function
                              end module
                              
                              real(8) function code(x, y, z, t, a, b, c, i, j, 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) :: t_3
                                  real(8) :: tmp
                                  t_1 = ((-27.0d0) * j) * k
                                  t_2 = ((-4.0d0) * a) * t
                                  t_3 = (j * 27.0d0) * k
                                  if (t_3 <= (-2d+93)) then
                                      tmp = t_1
                                  else if (t_3 <= (-5d-220)) then
                                      tmp = t_2
                                  else if (t_3 <= 0.0d0) then
                                      tmp = ((-4.0d0) * x) * i
                                  else if (t_3 <= 500000000.0d0) then
                                      tmp = t_2
                                  else
                                      tmp = t_1
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
                              	double t_1 = (-27.0 * j) * k;
                              	double t_2 = (-4.0 * a) * t;
                              	double t_3 = (j * 27.0) * k;
                              	double tmp;
                              	if (t_3 <= -2e+93) {
                              		tmp = t_1;
                              	} else if (t_3 <= -5e-220) {
                              		tmp = t_2;
                              	} else if (t_3 <= 0.0) {
                              		tmp = (-4.0 * x) * i;
                              	} else if (t_3 <= 500000000.0) {
                              		tmp = t_2;
                              	} else {
                              		tmp = t_1;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t, a, b, c, i, j, k):
                              	t_1 = (-27.0 * j) * k
                              	t_2 = (-4.0 * a) * t
                              	t_3 = (j * 27.0) * k
                              	tmp = 0
                              	if t_3 <= -2e+93:
                              		tmp = t_1
                              	elif t_3 <= -5e-220:
                              		tmp = t_2
                              	elif t_3 <= 0.0:
                              		tmp = (-4.0 * x) * i
                              	elif t_3 <= 500000000.0:
                              		tmp = t_2
                              	else:
                              		tmp = t_1
                              	return tmp
                              
                              function code(x, y, z, t, a, b, c, i, j, k)
                              	t_1 = Float64(Float64(-27.0 * j) * k)
                              	t_2 = Float64(Float64(-4.0 * a) * t)
                              	t_3 = Float64(Float64(j * 27.0) * k)
                              	tmp = 0.0
                              	if (t_3 <= -2e+93)
                              		tmp = t_1;
                              	elseif (t_3 <= -5e-220)
                              		tmp = t_2;
                              	elseif (t_3 <= 0.0)
                              		tmp = Float64(Float64(-4.0 * x) * i);
                              	elseif (t_3 <= 500000000.0)
                              		tmp = t_2;
                              	else
                              		tmp = t_1;
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
                              	t_1 = (-27.0 * j) * k;
                              	t_2 = (-4.0 * a) * t;
                              	t_3 = (j * 27.0) * k;
                              	tmp = 0.0;
                              	if (t_3 <= -2e+93)
                              		tmp = t_1;
                              	elseif (t_3 <= -5e-220)
                              		tmp = t_2;
                              	elseif (t_3 <= 0.0)
                              		tmp = (-4.0 * x) * i;
                              	elseif (t_3 <= 500000000.0)
                              		tmp = t_2;
                              	else
                              		tmp = t_1;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(-27.0 * j), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-4.0 * a), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$3, -2e+93], t$95$1, If[LessEqual[t$95$3, -5e-220], t$95$2, If[LessEqual[t$95$3, 0.0], N[(N[(-4.0 * x), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[t$95$3, 500000000.0], t$95$2, t$95$1]]]]]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              t_1 := \left(-27 \cdot j\right) \cdot k\\
                              t_2 := \left(-4 \cdot a\right) \cdot t\\
                              t_3 := \left(j \cdot 27\right) \cdot k\\
                              \mathbf{if}\;t\_3 \leq -2 \cdot 10^{+93}:\\
                              \;\;\;\;t\_1\\
                              
                              \mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-220}:\\
                              \;\;\;\;t\_2\\
                              
                              \mathbf{elif}\;t\_3 \leq 0:\\
                              \;\;\;\;\left(-4 \cdot x\right) \cdot i\\
                              
                              \mathbf{elif}\;t\_3 \leq 500000000:\\
                              \;\;\;\;t\_2\\
                              
                              \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) < -2.00000000000000009e93 or 5e8 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

                                1. Initial program 79.7%

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

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

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

                                    \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                  3. lower-*.f6453.1

                                    \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                                5. Applied rewrites53.1%

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

                                if -2.00000000000000009e93 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5.0000000000000002e-220 or 0.0 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 5e8

                                1. Initial program 90.1%

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

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

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

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

                                    \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                                5. Applied rewrites5.2%

                                  \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                6. Taylor expanded in t around inf

                                  \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
                                7. Step-by-step derivation
                                  1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \left(-4 \cdot a\right) \cdot t \]
                                10. Step-by-step derivation
                                  1. Applied rewrites37.6%

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

                                  if -5.0000000000000002e-220 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 0.0

                                  1. Initial program 83.4%

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

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

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

                                      \[\leadsto \color{blue}{\left(-4 \cdot x\right) \cdot i} \]
                                    3. lower-*.f64N/A

                                      \[\leadsto \color{blue}{\left(-4 \cdot x\right) \cdot i} \]
                                    4. lower-*.f6432.4

                                      \[\leadsto \color{blue}{\left(-4 \cdot x\right)} \cdot i \]
                                  5. Applied rewrites32.4%

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

                                Alternative 7: 64.7% accurate, 1.0× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+186}:\\ \;\;\;\;\mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-161}:\\ \;\;\;\;\mathsf{fma}\left(z \cdot x, 18 \cdot y, a \cdot -4\right) \cdot t\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+225}:\\ \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(t, a, i \cdot x\right) \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-27 \cdot j\right) \cdot k\\ \end{array} \end{array} \]
                                (FPCore (x y z t a b c i j k)
                                 :precision binary64
                                 (let* ((t_1 (* (* j 27.0) k)))
                                   (if (<= t_1 -2e+186)
                                     (fma c b (* -27.0 (* j k)))
                                     (if (<= t_1 -1e-161)
                                       (* (fma (* z x) (* 18.0 y) (* a -4.0)) t)
                                       (if (<= t_1 4e+225)
                                         (fma c b (* (fma t a (* i x)) -4.0))
                                         (* (* -27.0 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 <= -2e+186) {
                                		tmp = fma(c, b, (-27.0 * (j * k)));
                                	} else if (t_1 <= -1e-161) {
                                		tmp = fma((z * x), (18.0 * y), (a * -4.0)) * t;
                                	} else if (t_1 <= 4e+225) {
                                		tmp = fma(c, b, (fma(t, a, (i * x)) * -4.0));
                                	} else {
                                		tmp = (-27.0 * j) * k;
                                	}
                                	return tmp;
                                }
                                
                                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 <= -2e+186)
                                		tmp = fma(c, b, Float64(-27.0 * Float64(j * k)));
                                	elseif (t_1 <= -1e-161)
                                		tmp = Float64(fma(Float64(z * x), Float64(18.0 * y), Float64(a * -4.0)) * t);
                                	elseif (t_1 <= 4e+225)
                                		tmp = fma(c, b, Float64(fma(t, a, Float64(i * x)) * -4.0));
                                	else
                                		tmp = Float64(Float64(-27.0 * j) * k);
                                	end
                                	return tmp
                                end
                                
                                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, -2e+186], N[(c * b + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-161], N[(N[(N[(z * x), $MachinePrecision] * N[(18.0 * y), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t$95$1, 4e+225], N[(c * b + N[(N[(t * a + N[(i * x), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], N[(N[(-27.0 * j), $MachinePrecision] * k), $MachinePrecision]]]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_1 := \left(j \cdot 27\right) \cdot k\\
                                \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+186}:\\
                                \;\;\;\;\mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\
                                
                                \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-161}:\\
                                \;\;\;\;\mathsf{fma}\left(z \cdot x, 18 \cdot y, a \cdot -4\right) \cdot t\\
                                
                                \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+225}:\\
                                \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(t, a, i \cdot x\right) \cdot -4\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\left(-27 \cdot j\right) \cdot k\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 4 regimes
                                2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.99999999999999996e186

                                  1. Initial program 75.1%

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

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

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

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

                                      \[\leadsto \color{blue}{\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right)} - 27 \cdot \left(j \cdot k\right) \]
                                    4. metadata-evalN/A

                                      \[\leadsto \left(b \cdot c + \color{blue}{-4} \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right) \]
                                    5. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto b \cdot c - \color{blue}{27 \cdot \left(j \cdot k\right)} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites72.5%

                                      \[\leadsto \mathsf{fma}\left(-27, \color{blue}{k \cdot j}, b \cdot c\right) \]
                                    2. Step-by-step derivation
                                      1. Applied rewrites75.3%

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

                                      if -1.99999999999999996e186 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000003e-161

                                      1. Initial program 86.8%

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

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

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

                                          \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                        3. lower-*.f6411.3

                                          \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                                      5. Applied rewrites11.3%

                                        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                      6. Taylor expanded in t around inf

                                        \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
                                      7. Step-by-step derivation
                                        1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y \cdot z\right) \cdot x, 18, -4 \cdot a\right) \cdot t} \]
                                      9. Step-by-step derivation
                                        1. Applied rewrites67.6%

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

                                        if -1.00000000000000003e-161 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 3.99999999999999971e225

                                        1. Initial program 87.7%

                                          \[\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. Add Preprocessing
                                        3. 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 \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 \]
                                          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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)} \]
                                          4. lift-+.f64N/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) + b \cdot c\right)} - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right) \]
                                          5. +-commutativeN/A

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

                                            \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
                                          7. lift-*.f64N/A

                                            \[\leadsto \color{blue}{b \cdot c} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
                                          8. *-commutativeN/A

                                            \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
                                          9. lower-fma.f64N/A

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
                                          10. lower--.f64N/A

                                            \[\leadsto \mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)}\right) \]
                                        4. Applied rewrites91.6%

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

                                          \[\leadsto \mathsf{fma}\left(c, b, \color{blue}{-4 \cdot \left(a \cdot t\right) - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)}\right) \]
                                        6. Step-by-step derivation
                                          1. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \mathsf{fma}\left(c, b, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, i \cdot x\right), -27 \cdot \color{blue}{\left(k \cdot j\right)}\right)\right) \]
                                          13. lower-*.f6478.9

                                            \[\leadsto \mathsf{fma}\left(c, b, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, i \cdot x\right), -27 \cdot \color{blue}{\left(k \cdot j\right)}\right)\right) \]
                                        7. Applied rewrites78.9%

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

                                          \[\leadsto \mathsf{fma}\left(c, b, -4 \cdot \color{blue}{\left(a \cdot t + i \cdot x\right)}\right) \]
                                        9. Step-by-step derivation
                                          1. Applied rewrites74.4%

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

                                          if 3.99999999999999971e225 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

                                          1. Initial program 75.2%

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

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

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

                                              \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                            3. lower-*.f6487.4

                                              \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                                          5. Applied rewrites87.4%

                                            \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                        10. Recombined 4 regimes into one program.
                                        11. Add Preprocessing

                                        Alternative 8: 65.2% accurate, 1.0× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+186}:\\ \;\;\;\;\mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-80}:\\ \;\;\;\;\mathsf{fma}\left(-4, i, \left(\left(z \cdot y\right) \cdot t\right) \cdot 18\right) \cdot x\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+225}:\\ \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(t, a, i \cdot x\right) \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-27 \cdot j\right) \cdot k\\ \end{array} \end{array} \]
                                        (FPCore (x y z t a b c i j k)
                                         :precision binary64
                                         (let* ((t_1 (* (* j 27.0) k)))
                                           (if (<= t_1 -2e+186)
                                             (fma c b (* -27.0 (* j k)))
                                             (if (<= t_1 -5e-80)
                                               (* (fma -4.0 i (* (* (* z y) t) 18.0)) x)
                                               (if (<= t_1 4e+225)
                                                 (fma c b (* (fma t a (* i x)) -4.0))
                                                 (* (* -27.0 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 <= -2e+186) {
                                        		tmp = fma(c, b, (-27.0 * (j * k)));
                                        	} else if (t_1 <= -5e-80) {
                                        		tmp = fma(-4.0, i, (((z * y) * t) * 18.0)) * x;
                                        	} else if (t_1 <= 4e+225) {
                                        		tmp = fma(c, b, (fma(t, a, (i * x)) * -4.0));
                                        	} else {
                                        		tmp = (-27.0 * j) * k;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        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 <= -2e+186)
                                        		tmp = fma(c, b, Float64(-27.0 * Float64(j * k)));
                                        	elseif (t_1 <= -5e-80)
                                        		tmp = Float64(fma(-4.0, i, Float64(Float64(Float64(z * y) * t) * 18.0)) * x);
                                        	elseif (t_1 <= 4e+225)
                                        		tmp = fma(c, b, Float64(fma(t, a, Float64(i * x)) * -4.0));
                                        	else
                                        		tmp = Float64(Float64(-27.0 * j) * k);
                                        	end
                                        	return tmp
                                        end
                                        
                                        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, -2e+186], N[(c * b + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-80], N[(N[(-4.0 * i + N[(N[(N[(z * y), $MachinePrecision] * t), $MachinePrecision] * 18.0), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$1, 4e+225], N[(c * b + N[(N[(t * a + N[(i * x), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], N[(N[(-27.0 * j), $MachinePrecision] * k), $MachinePrecision]]]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        t_1 := \left(j \cdot 27\right) \cdot k\\
                                        \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+186}:\\
                                        \;\;\;\;\mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\
                                        
                                        \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-80}:\\
                                        \;\;\;\;\mathsf{fma}\left(-4, i, \left(\left(z \cdot y\right) \cdot t\right) \cdot 18\right) \cdot x\\
                                        
                                        \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+225}:\\
                                        \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(t, a, i \cdot x\right) \cdot -4\right)\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\left(-27 \cdot j\right) \cdot k\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 4 regimes
                                        2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.99999999999999996e186

                                          1. Initial program 75.1%

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

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

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

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

                                              \[\leadsto \color{blue}{\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right)} - 27 \cdot \left(j \cdot k\right) \]
                                            4. metadata-evalN/A

                                              \[\leadsto \left(b \cdot c + \color{blue}{-4} \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right) \]
                                            5. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto b \cdot c - \color{blue}{27 \cdot \left(j \cdot k\right)} \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites72.5%

                                              \[\leadsto \mathsf{fma}\left(-27, \color{blue}{k \cdot j}, b \cdot c\right) \]
                                            2. Step-by-step derivation
                                              1. Applied rewrites75.3%

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

                                              if -1.99999999999999996e186 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5e-80

                                              1. Initial program 85.7%

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

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

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

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

                                                  \[\leadsto \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot i\right)} \cdot x \]
                                                4. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

                                              if -5e-80 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 3.99999999999999971e225

                                              1. Initial program 88.1%

                                                \[\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. Add Preprocessing
                                              3. 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 \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 \]
                                                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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)} \]
                                                4. lift-+.f64N/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) + b \cdot c\right)} - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right) \]
                                                5. +-commutativeN/A

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

                                                  \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
                                                7. lift-*.f64N/A

                                                  \[\leadsto \color{blue}{b \cdot c} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
                                                8. *-commutativeN/A

                                                  \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
                                                9. lower-fma.f64N/A

                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
                                                10. lower--.f64N/A

                                                  \[\leadsto \mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)}\right) \]
                                              4. Applied rewrites92.3%

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

                                                \[\leadsto \mathsf{fma}\left(c, b, \color{blue}{-4 \cdot \left(a \cdot t\right) - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)}\right) \]
                                              6. Step-by-step derivation
                                                1. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(c, b, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, i \cdot x\right), -27 \cdot \color{blue}{\left(k \cdot j\right)}\right)\right) \]
                                                13. lower-*.f6478.6

                                                  \[\leadsto \mathsf{fma}\left(c, b, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, i \cdot x\right), -27 \cdot \color{blue}{\left(k \cdot j\right)}\right)\right) \]
                                              7. Applied rewrites78.6%

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

                                                \[\leadsto \mathsf{fma}\left(c, b, -4 \cdot \color{blue}{\left(a \cdot t + i \cdot x\right)}\right) \]
                                              9. Step-by-step derivation
                                                1. Applied rewrites74.3%

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

                                                if 3.99999999999999971e225 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

                                                1. Initial program 75.2%

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

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

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

                                                    \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                  3. lower-*.f6487.4

                                                    \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                                                5. Applied rewrites87.4%

                                                  \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                              10. Recombined 4 regimes into one program.
                                              11. Add Preprocessing

                                              Alternative 9: 53.4% accurate, 1.0× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\ t_2 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+56}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-80}:\\ \;\;\;\;\left(\left(y \cdot 18\right) \cdot \left(x \cdot z\right)\right) \cdot t\\ \mathbf{elif}\;t\_2 \leq 20000:\\ \;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, b \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                              (FPCore (x y z t a b c i j k)
                                               :precision binary64
                                               (let* ((t_1 (fma c b (* -27.0 (* j k)))) (t_2 (* (* j 27.0) k)))
                                                 (if (<= t_2 -5e+56)
                                                   t_1
                                                   (if (<= t_2 -5e-80)
                                                     (* (* (* y 18.0) (* x z)) t)
                                                     (if (<= t_2 20000.0) (fma (* -4.0 a) t (* b c)) t_1)))))
                                              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(c, b, (-27.0 * (j * k)));
                                              	double t_2 = (j * 27.0) * k;
                                              	double tmp;
                                              	if (t_2 <= -5e+56) {
                                              		tmp = t_1;
                                              	} else if (t_2 <= -5e-80) {
                                              		tmp = ((y * 18.0) * (x * z)) * t;
                                              	} else if (t_2 <= 20000.0) {
                                              		tmp = fma((-4.0 * a), t, (b * c));
                                              	} else {
                                              		tmp = t_1;
                                              	}
                                              	return tmp;
                                              }
                                              
                                              function code(x, y, z, t, a, b, c, i, j, k)
                                              	t_1 = fma(c, b, Float64(-27.0 * Float64(j * k)))
                                              	t_2 = Float64(Float64(j * 27.0) * k)
                                              	tmp = 0.0
                                              	if (t_2 <= -5e+56)
                                              		tmp = t_1;
                                              	elseif (t_2 <= -5e-80)
                                              		tmp = Float64(Float64(Float64(y * 18.0) * Float64(x * z)) * t);
                                              	elseif (t_2 <= 20000.0)
                                              		tmp = fma(Float64(-4.0 * a), t, Float64(b * c));
                                              	else
                                              		tmp = t_1;
                                              	end
                                              	return tmp
                                              end
                                              
                                              code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(c * b + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+56], t$95$1, If[LessEqual[t$95$2, -5e-80], N[(N[(N[(y * 18.0), $MachinePrecision] * N[(x * z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t$95$2, 20000.0], N[(N[(-4.0 * a), $MachinePrecision] * t + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              t_1 := \mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\
                                              t_2 := \left(j \cdot 27\right) \cdot k\\
                                              \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+56}:\\
                                              \;\;\;\;t\_1\\
                                              
                                              \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-80}:\\
                                              \;\;\;\;\left(\left(y \cdot 18\right) \cdot \left(x \cdot z\right)\right) \cdot t\\
                                              
                                              \mathbf{elif}\;t\_2 \leq 20000:\\
                                              \;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, 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) < -5.00000000000000024e56 or 2e4 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

                                                1. Initial program 80.6%

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

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

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

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

                                                    \[\leadsto \color{blue}{\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right)} - 27 \cdot \left(j \cdot k\right) \]
                                                  4. metadata-evalN/A

                                                    \[\leadsto \left(b \cdot c + \color{blue}{-4} \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right) \]
                                                  5. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto b \cdot c - \color{blue}{27 \cdot \left(j \cdot k\right)} \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites60.7%

                                                    \[\leadsto \mathsf{fma}\left(-27, \color{blue}{k \cdot j}, b \cdot c\right) \]
                                                  2. Step-by-step derivation
                                                    1. Applied rewrites61.7%

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

                                                    if -5.00000000000000024e56 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5e-80

                                                    1. Initial program 82.7%

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

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

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

                                                        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                      3. lower-*.f647.7

                                                        \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                                                    5. Applied rewrites7.7%

                                                      \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                    6. Taylor expanded in t around inf

                                                      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
                                                    7. Step-by-step derivation
                                                      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) \cdot t \]
                                                    10. Step-by-step derivation
                                                      1. Applied rewrites52.4%

                                                        \[\leadsto \left(\left(\left(y \cdot z\right) \cdot x\right) \cdot 18\right) \cdot t \]
                                                      2. Step-by-step derivation
                                                        1. Applied rewrites55.1%

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

                                                        if -5e-80 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2e4

                                                        1. Initial program 88.7%

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

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

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

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

                                                            \[\leadsto \color{blue}{\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right)} - 27 \cdot \left(j \cdot k\right) \]
                                                          4. metadata-evalN/A

                                                            \[\leadsto \left(b \cdot c + \color{blue}{-4} \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right) \]
                                                          5. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto b \cdot c - \color{blue}{27 \cdot \left(j \cdot k\right)} \]
                                                        7. Step-by-step derivation
                                                          1. Applied rewrites29.8%

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

                                                            \[\leadsto -4 \cdot \left(a \cdot t\right) + \color{blue}{b \cdot c} \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites56.3%

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

                                                          Alternative 10: 52.0% accurate, 1.0× speedup?

                                                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\ t_2 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+186}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-80}:\\ \;\;\;\;\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot 18\right) \cdot x\\ \mathbf{elif}\;t\_2 \leq 20000:\\ \;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, b \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                          (FPCore (x y z t a b c i j k)
                                                           :precision binary64
                                                           (let* ((t_1 (fma c b (* -27.0 (* j k)))) (t_2 (* (* j 27.0) k)))
                                                             (if (<= t_2 -2e+186)
                                                               t_1
                                                               (if (<= t_2 -5e-80)
                                                                 (* (* (* (* y z) t) 18.0) x)
                                                                 (if (<= t_2 20000.0) (fma (* -4.0 a) t (* b c)) t_1)))))
                                                          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(c, b, (-27.0 * (j * k)));
                                                          	double t_2 = (j * 27.0) * k;
                                                          	double tmp;
                                                          	if (t_2 <= -2e+186) {
                                                          		tmp = t_1;
                                                          	} else if (t_2 <= -5e-80) {
                                                          		tmp = (((y * z) * t) * 18.0) * x;
                                                          	} else if (t_2 <= 20000.0) {
                                                          		tmp = fma((-4.0 * a), t, (b * c));
                                                          	} else {
                                                          		tmp = t_1;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          function code(x, y, z, t, a, b, c, i, j, k)
                                                          	t_1 = fma(c, b, Float64(-27.0 * Float64(j * k)))
                                                          	t_2 = Float64(Float64(j * 27.0) * k)
                                                          	tmp = 0.0
                                                          	if (t_2 <= -2e+186)
                                                          		tmp = t_1;
                                                          	elseif (t_2 <= -5e-80)
                                                          		tmp = Float64(Float64(Float64(Float64(y * z) * t) * 18.0) * x);
                                                          	elseif (t_2 <= 20000.0)
                                                          		tmp = fma(Float64(-4.0 * a), t, Float64(b * c));
                                                          	else
                                                          		tmp = t_1;
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(c * b + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+186], t$95$1, If[LessEqual[t$95$2, -5e-80], N[(N[(N[(N[(y * z), $MachinePrecision] * t), $MachinePrecision] * 18.0), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$2, 20000.0], N[(N[(-4.0 * a), $MachinePrecision] * t + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \begin{array}{l}
                                                          t_1 := \mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\
                                                          t_2 := \left(j \cdot 27\right) \cdot k\\
                                                          \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+186}:\\
                                                          \;\;\;\;t\_1\\
                                                          
                                                          \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-80}:\\
                                                          \;\;\;\;\left(\left(\left(y \cdot z\right) \cdot t\right) \cdot 18\right) \cdot x\\
                                                          
                                                          \mathbf{elif}\;t\_2 \leq 20000:\\
                                                          \;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, 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) < -1.99999999999999996e186 or 2e4 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

                                                            1. Initial program 78.2%

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

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

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

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

                                                                \[\leadsto \color{blue}{\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right)} - 27 \cdot \left(j \cdot k\right) \]
                                                              4. metadata-evalN/A

                                                                \[\leadsto \left(b \cdot c + \color{blue}{-4} \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right) \]
                                                              5. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto b \cdot c - \color{blue}{27 \cdot \left(j \cdot k\right)} \]
                                                            7. Step-by-step derivation
                                                              1. Applied rewrites68.0%

                                                                \[\leadsto \mathsf{fma}\left(-27, \color{blue}{k \cdot j}, b \cdot c\right) \]
                                                              2. Step-by-step derivation
                                                                1. Applied rewrites69.1%

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

                                                                if -1.99999999999999996e186 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5e-80

                                                                1. Initial program 85.7%

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

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

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

                                                                    \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                  3. lower-*.f6413.3

                                                                    \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                                                                5. Applied rewrites13.3%

                                                                  \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                6. Taylor expanded in x around inf

                                                                  \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
                                                                7. Step-by-step derivation
                                                                  1. fp-cancel-sub-sign-invN/A

                                                                    \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot i\right)} \]
                                                                  2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  \[\leadsto \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot x \]
                                                                10. Step-by-step derivation
                                                                  1. Applied rewrites45.4%

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

                                                                  if -5e-80 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2e4

                                                                  1. Initial program 88.7%

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

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

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

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

                                                                      \[\leadsto \color{blue}{\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right)} - 27 \cdot \left(j \cdot k\right) \]
                                                                    4. metadata-evalN/A

                                                                      \[\leadsto \left(b \cdot c + \color{blue}{-4} \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right) \]
                                                                    5. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                                                    \[\leadsto b \cdot c - \color{blue}{27 \cdot \left(j \cdot k\right)} \]
                                                                  7. Step-by-step derivation
                                                                    1. Applied rewrites29.8%

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

                                                                      \[\leadsto -4 \cdot \left(a \cdot t\right) + \color{blue}{b \cdot c} \]
                                                                    3. Step-by-step derivation
                                                                      1. Applied rewrites56.3%

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

                                                                    Alternative 11: 53.4% accurate, 1.0× speedup?

                                                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\ t_2 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+56}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-80}:\\ \;\;\;\;\left(\left(\left(y \cdot z\right) \cdot x\right) \cdot t\right) \cdot 18\\ \mathbf{elif}\;t\_2 \leq 20000:\\ \;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, b \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                    (FPCore (x y z t a b c i j k)
                                                                     :precision binary64
                                                                     (let* ((t_1 (fma c b (* -27.0 (* j k)))) (t_2 (* (* j 27.0) k)))
                                                                       (if (<= t_2 -5e+56)
                                                                         t_1
                                                                         (if (<= t_2 -5e-80)
                                                                           (* (* (* (* y z) x) t) 18.0)
                                                                           (if (<= t_2 20000.0) (fma (* -4.0 a) t (* b c)) t_1)))))
                                                                    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(c, b, (-27.0 * (j * k)));
                                                                    	double t_2 = (j * 27.0) * k;
                                                                    	double tmp;
                                                                    	if (t_2 <= -5e+56) {
                                                                    		tmp = t_1;
                                                                    	} else if (t_2 <= -5e-80) {
                                                                    		tmp = (((y * z) * x) * t) * 18.0;
                                                                    	} else if (t_2 <= 20000.0) {
                                                                    		tmp = fma((-4.0 * a), t, (b * c));
                                                                    	} else {
                                                                    		tmp = t_1;
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    function code(x, y, z, t, a, b, c, i, j, k)
                                                                    	t_1 = fma(c, b, Float64(-27.0 * Float64(j * k)))
                                                                    	t_2 = Float64(Float64(j * 27.0) * k)
                                                                    	tmp = 0.0
                                                                    	if (t_2 <= -5e+56)
                                                                    		tmp = t_1;
                                                                    	elseif (t_2 <= -5e-80)
                                                                    		tmp = Float64(Float64(Float64(Float64(y * z) * x) * t) * 18.0);
                                                                    	elseif (t_2 <= 20000.0)
                                                                    		tmp = fma(Float64(-4.0 * a), t, Float64(b * c));
                                                                    	else
                                                                    		tmp = t_1;
                                                                    	end
                                                                    	return tmp
                                                                    end
                                                                    
                                                                    code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(c * b + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+56], t$95$1, If[LessEqual[t$95$2, -5e-80], N[(N[(N[(N[(y * z), $MachinePrecision] * x), $MachinePrecision] * t), $MachinePrecision] * 18.0), $MachinePrecision], If[LessEqual[t$95$2, 20000.0], N[(N[(-4.0 * a), $MachinePrecision] * t + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
                                                                    
                                                                    \begin{array}{l}
                                                                    
                                                                    \\
                                                                    \begin{array}{l}
                                                                    t_1 := \mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\
                                                                    t_2 := \left(j \cdot 27\right) \cdot k\\
                                                                    \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+56}:\\
                                                                    \;\;\;\;t\_1\\
                                                                    
                                                                    \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-80}:\\
                                                                    \;\;\;\;\left(\left(\left(y \cdot z\right) \cdot x\right) \cdot t\right) \cdot 18\\
                                                                    
                                                                    \mathbf{elif}\;t\_2 \leq 20000:\\
                                                                    \;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, 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) < -5.00000000000000024e56 or 2e4 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

                                                                      1. Initial program 80.6%

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

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

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

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

                                                                          \[\leadsto \color{blue}{\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right)} - 27 \cdot \left(j \cdot k\right) \]
                                                                        4. metadata-evalN/A

                                                                          \[\leadsto \left(b \cdot c + \color{blue}{-4} \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right) \]
                                                                        5. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                                                        \[\leadsto b \cdot c - \color{blue}{27 \cdot \left(j \cdot k\right)} \]
                                                                      7. Step-by-step derivation
                                                                        1. Applied rewrites60.7%

                                                                          \[\leadsto \mathsf{fma}\left(-27, \color{blue}{k \cdot j}, b \cdot c\right) \]
                                                                        2. Step-by-step derivation
                                                                          1. Applied rewrites61.7%

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

                                                                          if -5.00000000000000024e56 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5e-80

                                                                          1. Initial program 82.7%

                                                                            \[\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. Add Preprocessing
                                                                          3. Taylor expanded in i 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(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)} \]
                                                                          4. Step-by-step derivation
                                                                            1. +-commutativeN/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(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(a \cdot t\right)\right)} \]
                                                                            2. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                            \[\leadsto 18 \cdot \color{blue}{\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
                                                                          7. Step-by-step derivation
                                                                            1. Applied rewrites52.5%

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

                                                                            if -5e-80 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2e4

                                                                            1. Initial program 88.7%

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

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

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

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

                                                                                \[\leadsto \color{blue}{\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right)} - 27 \cdot \left(j \cdot k\right) \]
                                                                              4. metadata-evalN/A

                                                                                \[\leadsto \left(b \cdot c + \color{blue}{-4} \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right) \]
                                                                              5. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                                                              \[\leadsto b \cdot c - \color{blue}{27 \cdot \left(j \cdot k\right)} \]
                                                                            7. Step-by-step derivation
                                                                              1. Applied rewrites29.8%

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

                                                                                \[\leadsto -4 \cdot \left(a \cdot t\right) + \color{blue}{b \cdot c} \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites56.3%

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

                                                                              Alternative 12: 82.4% accurate, 1.2× speedup?

                                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.08 \cdot 10^{-110} \lor \neg \left(z \leq 3.1 \cdot 10^{+197}\right):\\ \;\;\;\;\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(\mathsf{fma}\left(-4, a, \left(\left(y \cdot x\right) \cdot z\right) \cdot 18\right), t, c \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, i \cdot x\right), -27 \cdot \left(k \cdot j\right)\right)\right)\\ \end{array} \end{array} \]
                                                                              (FPCore (x y z t a b c i j k)
                                                                               :precision binary64
                                                                               (if (or (<= z -1.08e-110) (not (<= z 3.1e+197)))
                                                                                 (fma (* -27.0 j) k (fma (fma -4.0 a (* (* (* y x) z) 18.0)) t (* c b)))
                                                                                 (fma c b (fma -4.0 (fma t a (* i x)) (* -27.0 (* k j))))))
                                                                              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 ((z <= -1.08e-110) || !(z <= 3.1e+197)) {
                                                                              		tmp = fma((-27.0 * j), k, fma(fma(-4.0, a, (((y * x) * z) * 18.0)), t, (c * b)));
                                                                              	} else {
                                                                              		tmp = fma(c, b, fma(-4.0, fma(t, a, (i * x)), (-27.0 * (k * j))));
                                                                              	}
                                                                              	return tmp;
                                                                              }
                                                                              
                                                                              function code(x, y, z, t, a, b, c, i, j, k)
                                                                              	tmp = 0.0
                                                                              	if ((z <= -1.08e-110) || !(z <= 3.1e+197))
                                                                              		tmp = fma(Float64(-27.0 * j), k, fma(fma(-4.0, a, Float64(Float64(Float64(y * x) * z) * 18.0)), t, Float64(c * b)));
                                                                              	else
                                                                              		tmp = fma(c, b, fma(-4.0, fma(t, a, Float64(i * x)), Float64(-27.0 * Float64(k * j))));
                                                                              	end
                                                                              	return tmp
                                                                              end
                                                                              
                                                                              code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[z, -1.08e-110], N[Not[LessEqual[z, 3.1e+197]], $MachinePrecision]], N[(N[(-27.0 * j), $MachinePrecision] * k + N[(N[(-4.0 * a + N[(N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision] * 18.0), $MachinePrecision]), $MachinePrecision] * t + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * b + N[(-4.0 * N[(t * a + N[(i * x), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                              
                                                                              \begin{array}{l}
                                                                              
                                                                              \\
                                                                              \begin{array}{l}
                                                                              \mathbf{if}\;z \leq -1.08 \cdot 10^{-110} \lor \neg \left(z \leq 3.1 \cdot 10^{+197}\right):\\
                                                                              \;\;\;\;\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(\mathsf{fma}\left(-4, a, \left(\left(y \cdot x\right) \cdot z\right) \cdot 18\right), t, c \cdot b\right)\right)\\
                                                                              
                                                                              \mathbf{else}:\\
                                                                              \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, i \cdot x\right), -27 \cdot \left(k \cdot j\right)\right)\right)\\
                                                                              
                                                                              
                                                                              \end{array}
                                                                              \end{array}
                                                                              
                                                                              Derivation
                                                                              1. Split input into 2 regimes
                                                                              2. if z < -1.07999999999999995e-110 or 3.1e197 < z

                                                                                1. Initial program 83.1%

                                                                                  \[\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. Add Preprocessing
                                                                                3. Taylor expanded in i 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(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)} \]
                                                                                4. Step-by-step derivation
                                                                                  1. +-commutativeN/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(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(a \cdot t\right)\right)} \]
                                                                                  2. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

                                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(\mathsf{fma}\left(-4, a, \left(\left(z \cdot y\right) \cdot x\right) \cdot 18\right), t, c \cdot b\right)\right)} \]
                                                                                6. Step-by-step derivation
                                                                                  1. Applied rewrites84.7%

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

                                                                                  if -1.07999999999999995e-110 < z < 3.1e197

                                                                                  1. Initial program 85.8%

                                                                                    \[\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. Add Preprocessing
                                                                                  3. 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 \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 \]
                                                                                    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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)} \]
                                                                                    4. lift-+.f64N/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) + b \cdot c\right)} - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right) \]
                                                                                    5. +-commutativeN/A

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

                                                                                      \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
                                                                                    7. lift-*.f64N/A

                                                                                      \[\leadsto \color{blue}{b \cdot c} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
                                                                                    8. *-commutativeN/A

                                                                                      \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
                                                                                    9. lower-fma.f64N/A

                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
                                                                                    10. lower--.f64N/A

                                                                                      \[\leadsto \mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)}\right) \]
                                                                                  4. Applied rewrites88.7%

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

                                                                                    \[\leadsto \mathsf{fma}\left(c, b, \color{blue}{-4 \cdot \left(a \cdot t\right) - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)}\right) \]
                                                                                  6. Step-by-step derivation
                                                                                    1. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

                                                                                      \[\leadsto \mathsf{fma}\left(c, b, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, i \cdot x\right), -27 \cdot \color{blue}{\left(k \cdot j\right)}\right)\right) \]
                                                                                    13. lower-*.f6482.6

                                                                                      \[\leadsto \mathsf{fma}\left(c, b, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, i \cdot x\right), -27 \cdot \color{blue}{\left(k \cdot j\right)}\right)\right) \]
                                                                                  7. Applied rewrites82.6%

                                                                                    \[\leadsto \mathsf{fma}\left(c, b, \color{blue}{\mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, i \cdot x\right), -27 \cdot \left(k \cdot j\right)\right)}\right) \]
                                                                                7. Recombined 2 regimes into one program.
                                                                                8. Final simplification83.6%

                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.08 \cdot 10^{-110} \lor \neg \left(z \leq 3.1 \cdot 10^{+197}\right):\\ \;\;\;\;\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(\mathsf{fma}\left(-4, a, \left(\left(y \cdot x\right) \cdot z\right) \cdot 18\right), t, c \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, i \cdot x\right), -27 \cdot \left(k \cdot j\right)\right)\right)\\ \end{array} \]
                                                                                9. Add Preprocessing

                                                                                Alternative 13: 84.2% accurate, 1.2× speedup?

                                                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -6.7 \cdot 10^{+38}:\\ \;\;\;\;\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(\mathsf{fma}\left(-4, a, \left(\left(z \cdot y\right) \cdot x\right) \cdot 18\right), t, c \cdot b\right)\right)\\ \mathbf{elif}\;t \leq 3 \cdot 10^{-55}:\\ \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, i \cdot x\right), -27 \cdot \left(k \cdot j\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(\mathsf{fma}\left(\left(y \cdot z\right) \cdot x, 18, -4 \cdot a\right), t, \left(i \cdot x\right) \cdot -4\right)\right)\\ \end{array} \end{array} \]
                                                                                (FPCore (x y z t a b c i j k)
                                                                                 :precision binary64
                                                                                 (if (<= t -6.7e+38)
                                                                                   (fma (* -27.0 j) k (fma (fma -4.0 a (* (* (* z y) x) 18.0)) t (* c b)))
                                                                                   (if (<= t 3e-55)
                                                                                     (fma c b (fma -4.0 (fma t a (* i x)) (* -27.0 (* k j))))
                                                                                     (fma c b (fma (fma (* (* y z) x) 18.0 (* -4.0 a)) t (* (* i x) -4.0))))))
                                                                                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 <= -6.7e+38) {
                                                                                		tmp = fma((-27.0 * j), k, fma(fma(-4.0, a, (((z * y) * x) * 18.0)), t, (c * b)));
                                                                                	} else if (t <= 3e-55) {
                                                                                		tmp = fma(c, b, fma(-4.0, fma(t, a, (i * x)), (-27.0 * (k * j))));
                                                                                	} else {
                                                                                		tmp = fma(c, b, fma(fma(((y * z) * x), 18.0, (-4.0 * a)), t, ((i * x) * -4.0)));
                                                                                	}
                                                                                	return tmp;
                                                                                }
                                                                                
                                                                                function code(x, y, z, t, a, b, c, i, j, k)
                                                                                	tmp = 0.0
                                                                                	if (t <= -6.7e+38)
                                                                                		tmp = fma(Float64(-27.0 * j), k, fma(fma(-4.0, a, Float64(Float64(Float64(z * y) * x) * 18.0)), t, Float64(c * b)));
                                                                                	elseif (t <= 3e-55)
                                                                                		tmp = fma(c, b, fma(-4.0, fma(t, a, Float64(i * x)), Float64(-27.0 * Float64(k * j))));
                                                                                	else
                                                                                		tmp = fma(c, b, fma(fma(Float64(Float64(y * z) * x), 18.0, Float64(-4.0 * a)), t, Float64(Float64(i * x) * -4.0)));
                                                                                	end
                                                                                	return tmp
                                                                                end
                                                                                
                                                                                code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -6.7e+38], N[(N[(-27.0 * j), $MachinePrecision] * k + N[(N[(-4.0 * a + N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] * 18.0), $MachinePrecision]), $MachinePrecision] * t + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e-55], N[(c * b + N[(-4.0 * N[(t * a + N[(i * x), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * b + N[(N[(N[(N[(y * z), $MachinePrecision] * x), $MachinePrecision] * 18.0 + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] * t + N[(N[(i * x), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                                                                
                                                                                \begin{array}{l}
                                                                                
                                                                                \\
                                                                                \begin{array}{l}
                                                                                \mathbf{if}\;t \leq -6.7 \cdot 10^{+38}:\\
                                                                                \;\;\;\;\mathsf{fma}\left(-27 \cdot j, k, \mathsf{fma}\left(\mathsf{fma}\left(-4, a, \left(\left(z \cdot y\right) \cdot x\right) \cdot 18\right), t, c \cdot b\right)\right)\\
                                                                                
                                                                                \mathbf{elif}\;t \leq 3 \cdot 10^{-55}:\\
                                                                                \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, i \cdot x\right), -27 \cdot \left(k \cdot j\right)\right)\right)\\
                                                                                
                                                                                \mathbf{else}:\\
                                                                                \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(\mathsf{fma}\left(\left(y \cdot z\right) \cdot x, 18, -4 \cdot a\right), t, \left(i \cdot x\right) \cdot -4\right)\right)\\
                                                                                
                                                                                
                                                                                \end{array}
                                                                                \end{array}
                                                                                
                                                                                Derivation
                                                                                1. Split input into 3 regimes
                                                                                2. if t < -6.70000000000000025e38

                                                                                  1. Initial program 84.9%

                                                                                    \[\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. Add Preprocessing
                                                                                  3. Taylor expanded in i 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(a \cdot t\right) + 27 \cdot \left(j \cdot k\right)\right)} \]
                                                                                  4. Step-by-step derivation
                                                                                    1. +-commutativeN/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(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(a \cdot t\right)\right)} \]
                                                                                    2. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  if -6.70000000000000025e38 < t < 3.00000000000000016e-55

                                                                                  1. Initial program 84.2%

                                                                                    \[\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. Add Preprocessing
                                                                                  3. 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 \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 \]
                                                                                    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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)} \]
                                                                                    4. lift-+.f64N/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) + b \cdot c\right)} - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right) \]
                                                                                    5. +-commutativeN/A

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

                                                                                      \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
                                                                                    7. lift-*.f64N/A

                                                                                      \[\leadsto \color{blue}{b \cdot c} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
                                                                                    8. *-commutativeN/A

                                                                                      \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
                                                                                    9. lower-fma.f64N/A

                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
                                                                                    10. lower--.f64N/A

                                                                                      \[\leadsto \mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)}\right) \]
                                                                                  4. Applied rewrites85.9%

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

                                                                                    \[\leadsto \mathsf{fma}\left(c, b, \color{blue}{-4 \cdot \left(a \cdot t\right) - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)}\right) \]
                                                                                  6. Step-by-step derivation
                                                                                    1. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                      \[\leadsto \mathsf{fma}\left(c, b, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, i \cdot x\right), -27 \cdot \color{blue}{\left(k \cdot j\right)}\right)\right) \]
                                                                                  7. Applied rewrites89.5%

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

                                                                                  if 3.00000000000000016e-55 < t

                                                                                  1. Initial program 84.7%

                                                                                    \[\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. Add Preprocessing
                                                                                  3. 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 \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 \]
                                                                                    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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)} \]
                                                                                    4. lift-+.f64N/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) + b \cdot c\right)} - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right) \]
                                                                                    5. +-commutativeN/A

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

                                                                                      \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
                                                                                    7. lift-*.f64N/A

                                                                                      \[\leadsto \color{blue}{b \cdot c} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
                                                                                    8. *-commutativeN/A

                                                                                      \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
                                                                                    9. lower-fma.f64N/A

                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
                                                                                    10. lower--.f64N/A

                                                                                      \[\leadsto \mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)}\right) \]
                                                                                  4. Applied rewrites88.6%

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

                                                                                    \[\leadsto \mathsf{fma}\left(c, b, \color{blue}{t \cdot \left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) - 4 \cdot \left(i \cdot x\right)}\right) \]
                                                                                  6. Step-by-step derivation
                                                                                    1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                Alternative 14: 68.8% accurate, 1.2× speedup?

                                                                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+201}:\\ \;\;\;\;\mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+225}:\\ \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(t, a, i \cdot x\right) \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-27 \cdot j\right) \cdot k\\ \end{array} \end{array} \]
                                                                                (FPCore (x y z t a b c i j k)
                                                                                 :precision binary64
                                                                                 (let* ((t_1 (* (* j 27.0) k)))
                                                                                   (if (<= t_1 -1e+201)
                                                                                     (fma c b (* -27.0 (* j k)))
                                                                                     (if (<= t_1 4e+225)
                                                                                       (fma c b (* (fma t a (* i x)) -4.0))
                                                                                       (* (* -27.0 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 <= -1e+201) {
                                                                                		tmp = fma(c, b, (-27.0 * (j * k)));
                                                                                	} else if (t_1 <= 4e+225) {
                                                                                		tmp = fma(c, b, (fma(t, a, (i * x)) * -4.0));
                                                                                	} else {
                                                                                		tmp = (-27.0 * j) * k;
                                                                                	}
                                                                                	return tmp;
                                                                                }
                                                                                
                                                                                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 <= -1e+201)
                                                                                		tmp = fma(c, b, Float64(-27.0 * Float64(j * k)));
                                                                                	elseif (t_1 <= 4e+225)
                                                                                		tmp = fma(c, b, Float64(fma(t, a, Float64(i * x)) * -4.0));
                                                                                	else
                                                                                		tmp = Float64(Float64(-27.0 * j) * k);
                                                                                	end
                                                                                	return tmp
                                                                                end
                                                                                
                                                                                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, -1e+201], N[(c * b + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+225], N[(c * b + N[(N[(t * a + N[(i * x), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], N[(N[(-27.0 * j), $MachinePrecision] * k), $MachinePrecision]]]]
                                                                                
                                                                                \begin{array}{l}
                                                                                
                                                                                \\
                                                                                \begin{array}{l}
                                                                                t_1 := \left(j \cdot 27\right) \cdot k\\
                                                                                \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+201}:\\
                                                                                \;\;\;\;\mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\
                                                                                
                                                                                \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+225}:\\
                                                                                \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(t, a, i \cdot x\right) \cdot -4\right)\\
                                                                                
                                                                                \mathbf{else}:\\
                                                                                \;\;\;\;\left(-27 \cdot j\right) \cdot k\\
                                                                                
                                                                                
                                                                                \end{array}
                                                                                \end{array}
                                                                                
                                                                                Derivation
                                                                                1. Split input into 3 regimes
                                                                                2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.00000000000000004e201

                                                                                  1. Initial program 71.2%

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

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

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

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

                                                                                      \[\leadsto \color{blue}{\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right)} - 27 \cdot \left(j \cdot k\right) \]
                                                                                    4. metadata-evalN/A

                                                                                      \[\leadsto \left(b \cdot c + \color{blue}{-4} \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right) \]
                                                                                    5. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                                                                    \[\leadsto b \cdot c - \color{blue}{27 \cdot \left(j \cdot k\right)} \]
                                                                                  7. Step-by-step derivation
                                                                                    1. Applied rewrites74.3%

                                                                                      \[\leadsto \mathsf{fma}\left(-27, \color{blue}{k \cdot j}, b \cdot c\right) \]
                                                                                    2. Step-by-step derivation
                                                                                      1. Applied rewrites77.6%

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

                                                                                      if -1.00000000000000004e201 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 3.99999999999999971e225

                                                                                      1. Initial program 87.7%

                                                                                        \[\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. Add Preprocessing
                                                                                      3. 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 \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 \]
                                                                                        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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)} \]
                                                                                        4. lift-+.f64N/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) + b \cdot c\right)} - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right) \]
                                                                                        5. +-commutativeN/A

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

                                                                                          \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
                                                                                        7. lift-*.f64N/A

                                                                                          \[\leadsto \color{blue}{b \cdot c} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
                                                                                        8. *-commutativeN/A

                                                                                          \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
                                                                                        9. lower-fma.f64N/A

                                                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
                                                                                        10. lower--.f64N/A

                                                                                          \[\leadsto \mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)}\right) \]
                                                                                      4. Applied rewrites91.2%

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

                                                                                        \[\leadsto \mathsf{fma}\left(c, b, \color{blue}{-4 \cdot \left(a \cdot t\right) - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)}\right) \]
                                                                                      6. Step-by-step derivation
                                                                                        1. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                          \[\leadsto \mathsf{fma}\left(c, b, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, i \cdot x\right), -27 \cdot \color{blue}{\left(k \cdot j\right)}\right)\right) \]
                                                                                      7. Applied rewrites74.2%

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

                                                                                        \[\leadsto \mathsf{fma}\left(c, b, -4 \cdot \color{blue}{\left(a \cdot t + i \cdot x\right)}\right) \]
                                                                                      9. Step-by-step derivation
                                                                                        1. Applied rewrites67.6%

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

                                                                                        if 3.99999999999999971e225 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

                                                                                        1. Initial program 75.2%

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

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

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

                                                                                            \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                                          3. lower-*.f6487.4

                                                                                            \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                                                                                        5. Applied rewrites87.4%

                                                                                          \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                                      10. Recombined 3 regimes into one program.
                                                                                      11. Add Preprocessing

                                                                                      Alternative 15: 55.7% accurate, 1.4× speedup?

                                                                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+93} \lor \neg \left(t\_1 \leq 20000\right):\\ \;\;\;\;\mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, b \cdot c\right)\\ \end{array} \end{array} \]
                                                                                      (FPCore (x y z t a b c i j k)
                                                                                       :precision binary64
                                                                                       (let* ((t_1 (* (* j 27.0) k)))
                                                                                         (if (or (<= t_1 -2e+93) (not (<= t_1 20000.0)))
                                                                                           (fma c b (* -27.0 (* j k)))
                                                                                           (fma (* -4.0 a) t (* b c)))))
                                                                                      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 <= -2e+93) || !(t_1 <= 20000.0)) {
                                                                                      		tmp = fma(c, b, (-27.0 * (j * k)));
                                                                                      	} else {
                                                                                      		tmp = fma((-4.0 * a), t, (b * c));
                                                                                      	}
                                                                                      	return tmp;
                                                                                      }
                                                                                      
                                                                                      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 <= -2e+93) || !(t_1 <= 20000.0))
                                                                                      		tmp = fma(c, b, Float64(-27.0 * Float64(j * k)));
                                                                                      	else
                                                                                      		tmp = fma(Float64(-4.0 * a), t, Float64(b * c));
                                                                                      	end
                                                                                      	return tmp
                                                                                      end
                                                                                      
                                                                                      code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+93], N[Not[LessEqual[t$95$1, 20000.0]], $MachinePrecision]], N[(c * b + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * a), $MachinePrecision] * t + N[(b * c), $MachinePrecision]), $MachinePrecision]]]
                                                                                      
                                                                                      \begin{array}{l}
                                                                                      
                                                                                      \\
                                                                                      \begin{array}{l}
                                                                                      t_1 := \left(j \cdot 27\right) \cdot k\\
                                                                                      \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+93} \lor \neg \left(t\_1 \leq 20000\right):\\
                                                                                      \;\;\;\;\mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\
                                                                                      
                                                                                      \mathbf{else}:\\
                                                                                      \;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, b \cdot c\right)\\
                                                                                      
                                                                                      
                                                                                      \end{array}
                                                                                      \end{array}
                                                                                      
                                                                                      Derivation
                                                                                      1. Split input into 2 regimes
                                                                                      2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.00000000000000009e93 or 2e4 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

                                                                                        1. Initial program 79.9%

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

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

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

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

                                                                                            \[\leadsto \color{blue}{\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right)} - 27 \cdot \left(j \cdot k\right) \]
                                                                                          4. metadata-evalN/A

                                                                                            \[\leadsto \left(b \cdot c + \color{blue}{-4} \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right) \]
                                                                                          5. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                                                                          \[\leadsto b \cdot c - \color{blue}{27 \cdot \left(j \cdot k\right)} \]
                                                                                        7. Step-by-step derivation
                                                                                          1. Applied rewrites62.0%

                                                                                            \[\leadsto \mathsf{fma}\left(-27, \color{blue}{k \cdot j}, b \cdot c\right) \]
                                                                                          2. Step-by-step derivation
                                                                                            1. Applied rewrites63.0%

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

                                                                                            if -2.00000000000000009e93 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2e4

                                                                                            1. Initial program 87.7%

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

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

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

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

                                                                                                \[\leadsto \color{blue}{\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right)} - 27 \cdot \left(j \cdot k\right) \]
                                                                                              4. metadata-evalN/A

                                                                                                \[\leadsto \left(b \cdot c + \color{blue}{-4} \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right) \]
                                                                                              5. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                                                                              \[\leadsto b \cdot c - \color{blue}{27 \cdot \left(j \cdot k\right)} \]
                                                                                            7. Step-by-step derivation
                                                                                              1. Applied rewrites26.3%

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

                                                                                                \[\leadsto -4 \cdot \left(a \cdot t\right) + \color{blue}{b \cdot c} \]
                                                                                              3. Step-by-step derivation
                                                                                                1. Applied rewrites51.8%

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

                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;\left(j \cdot 27\right) \cdot k \leq -2 \cdot 10^{+93} \lor \neg \left(\left(j \cdot 27\right) \cdot k \leq 20000\right):\\ \;\;\;\;\mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-4 \cdot a, t, b \cdot c\right)\\ \end{array} \]
                                                                                              6. Add Preprocessing

                                                                                              Alternative 16: 74.3% accurate, 1.5× speedup?

                                                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{+243}:\\ \;\;\;\;\mathsf{fma}\left(z \cdot x, 18 \cdot y, a \cdot -4\right) \cdot t\\ \mathbf{elif}\;y \leq 3700000000:\\ \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, i \cdot x\right), -27 \cdot \left(k \cdot j\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(t \cdot y\right) \cdot z, 18, -4 \cdot i\right) \cdot x\\ \end{array} \end{array} \]
                                                                                              (FPCore (x y z t a b c i j k)
                                                                                               :precision binary64
                                                                                               (if (<= y -2.1e+243)
                                                                                                 (* (fma (* z x) (* 18.0 y) (* a -4.0)) t)
                                                                                                 (if (<= y 3700000000.0)
                                                                                                   (fma c b (fma -4.0 (fma t a (* i x)) (* -27.0 (* k j))))
                                                                                                   (* (fma (* (* t y) z) 18.0 (* -4.0 i)) x))))
                                                                                              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 (y <= -2.1e+243) {
                                                                                              		tmp = fma((z * x), (18.0 * y), (a * -4.0)) * t;
                                                                                              	} else if (y <= 3700000000.0) {
                                                                                              		tmp = fma(c, b, fma(-4.0, fma(t, a, (i * x)), (-27.0 * (k * j))));
                                                                                              	} else {
                                                                                              		tmp = fma(((t * y) * z), 18.0, (-4.0 * i)) * x;
                                                                                              	}
                                                                                              	return tmp;
                                                                                              }
                                                                                              
                                                                                              function code(x, y, z, t, a, b, c, i, j, k)
                                                                                              	tmp = 0.0
                                                                                              	if (y <= -2.1e+243)
                                                                                              		tmp = Float64(fma(Float64(z * x), Float64(18.0 * y), Float64(a * -4.0)) * t);
                                                                                              	elseif (y <= 3700000000.0)
                                                                                              		tmp = fma(c, b, fma(-4.0, fma(t, a, Float64(i * x)), Float64(-27.0 * Float64(k * j))));
                                                                                              	else
                                                                                              		tmp = Float64(fma(Float64(Float64(t * y) * z), 18.0, Float64(-4.0 * i)) * x);
                                                                                              	end
                                                                                              	return tmp
                                                                                              end
                                                                                              
                                                                                              code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[y, -2.1e+243], N[(N[(N[(z * x), $MachinePrecision] * N[(18.0 * y), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 3700000000.0], N[(c * b + N[(-4.0 * N[(t * a + N[(i * x), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(t * y), $MachinePrecision] * z), $MachinePrecision] * 18.0 + N[(-4.0 * i), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]
                                                                                              
                                                                                              \begin{array}{l}
                                                                                              
                                                                                              \\
                                                                                              \begin{array}{l}
                                                                                              \mathbf{if}\;y \leq -2.1 \cdot 10^{+243}:\\
                                                                                              \;\;\;\;\mathsf{fma}\left(z \cdot x, 18 \cdot y, a \cdot -4\right) \cdot t\\
                                                                                              
                                                                                              \mathbf{elif}\;y \leq 3700000000:\\
                                                                                              \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, i \cdot x\right), -27 \cdot \left(k \cdot j\right)\right)\right)\\
                                                                                              
                                                                                              \mathbf{else}:\\
                                                                                              \;\;\;\;\mathsf{fma}\left(\left(t \cdot y\right) \cdot z, 18, -4 \cdot i\right) \cdot x\\
                                                                                              
                                                                                              
                                                                                              \end{array}
                                                                                              \end{array}
                                                                                              
                                                                                              Derivation
                                                                                              1. Split input into 3 regimes
                                                                                              2. if y < -2.0999999999999999e243

                                                                                                1. Initial program 78.5%

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

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

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

                                                                                                    \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                                                  3. lower-*.f6415.9

                                                                                                    \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                                                                                                5. Applied rewrites15.9%

                                                                                                  \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                                                6. Taylor expanded in t around inf

                                                                                                  \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
                                                                                                7. Step-by-step derivation
                                                                                                  1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y \cdot z\right) \cdot x, 18, -4 \cdot a\right) \cdot t} \]
                                                                                                9. Step-by-step derivation
                                                                                                  1. Applied rewrites71.5%

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

                                                                                                  if -2.0999999999999999e243 < y < 3.7e9

                                                                                                  1. Initial program 90.2%

                                                                                                    \[\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. Add Preprocessing
                                                                                                  3. 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 \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 \]
                                                                                                    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) + b \cdot c\right) - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)} \]
                                                                                                    4. lift-+.f64N/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) + b \cdot c\right)} - \left(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right) \]
                                                                                                    5. +-commutativeN/A

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

                                                                                                      \[\leadsto \color{blue}{b \cdot c + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
                                                                                                    7. lift-*.f64N/A

                                                                                                      \[\leadsto \color{blue}{b \cdot c} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
                                                                                                    8. *-commutativeN/A

                                                                                                      \[\leadsto \color{blue}{c \cdot b} + \left(\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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right) \]
                                                                                                    9. lower-fma.f64N/A

                                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)\right)} \]
                                                                                                    10. lower--.f64N/A

                                                                                                      \[\leadsto \mathsf{fma}\left(c, b, \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(\left(x \cdot 4\right) \cdot i + \left(j \cdot 27\right) \cdot k\right)}\right) \]
                                                                                                  4. Applied rewrites92.5%

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

                                                                                                    \[\leadsto \mathsf{fma}\left(c, b, \color{blue}{-4 \cdot \left(a \cdot t\right) - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)}\right) \]
                                                                                                  6. Step-by-step derivation
                                                                                                    1. associate--r+N/A

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

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

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

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

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

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

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

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

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

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

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

                                                                                                      \[\leadsto \mathsf{fma}\left(c, b, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, i \cdot x\right), -27 \cdot \color{blue}{\left(k \cdot j\right)}\right)\right) \]
                                                                                                    13. lower-*.f6486.8

                                                                                                      \[\leadsto \mathsf{fma}\left(c, b, \mathsf{fma}\left(-4, \mathsf{fma}\left(t, a, i \cdot x\right), -27 \cdot \color{blue}{\left(k \cdot j\right)}\right)\right) \]
                                                                                                  7. Applied rewrites86.8%

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

                                                                                                  if 3.7e9 < y

                                                                                                  1. Initial program 71.8%

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

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

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

                                                                                                      \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                                                    3. lower-*.f6423.3

                                                                                                      \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                                                                                                  5. Applied rewrites23.3%

                                                                                                    \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                                                  6. Taylor expanded in x around inf

                                                                                                    \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
                                                                                                  7. Step-by-step derivation
                                                                                                    1. fp-cancel-sub-sign-invN/A

                                                                                                      \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot i\right)} \]
                                                                                                    2. metadata-evalN/A

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

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

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

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

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

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

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

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

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

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

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

                                                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y \cdot z\right) \cdot t, 18, -4 \cdot i\right) \cdot x} \]
                                                                                                  9. Step-by-step derivation
                                                                                                    1. Applied rewrites58.8%

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

                                                                                                  Alternative 17: 35.7% accurate, 1.6× speedup?

                                                                                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(j \cdot 27\right) \cdot k\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+93} \lor \neg \left(t\_1 \leq 500000000\right):\\ \;\;\;\;\left(-27 \cdot j\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;\left(-4 \cdot a\right) \cdot t\\ \end{array} \end{array} \]
                                                                                                  (FPCore (x y z t a b c i j k)
                                                                                                   :precision binary64
                                                                                                   (let* ((t_1 (* (* j 27.0) k)))
                                                                                                     (if (or (<= t_1 -2e+93) (not (<= t_1 500000000.0)))
                                                                                                       (* (* -27.0 j) k)
                                                                                                       (* (* -4.0 a) t))))
                                                                                                  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 <= -2e+93) || !(t_1 <= 500000000.0)) {
                                                                                                  		tmp = (-27.0 * j) * k;
                                                                                                  	} else {
                                                                                                  		tmp = (-4.0 * a) * t;
                                                                                                  	}
                                                                                                  	return tmp;
                                                                                                  }
                                                                                                  
                                                                                                  module fmin_fmax_functions
                                                                                                      implicit none
                                                                                                      private
                                                                                                      public fmax
                                                                                                      public fmin
                                                                                                  
                                                                                                      interface fmax
                                                                                                          module procedure fmax88
                                                                                                          module procedure fmax44
                                                                                                          module procedure fmax84
                                                                                                          module procedure fmax48
                                                                                                      end interface
                                                                                                      interface fmin
                                                                                                          module procedure fmin88
                                                                                                          module procedure fmin44
                                                                                                          module procedure fmin84
                                                                                                          module procedure fmin48
                                                                                                      end interface
                                                                                                  contains
                                                                                                      real(8) function fmax88(x, y) result (res)
                                                                                                          real(8), intent (in) :: x
                                                                                                          real(8), intent (in) :: y
                                                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                      end function
                                                                                                      real(4) function fmax44(x, y) result (res)
                                                                                                          real(4), intent (in) :: x
                                                                                                          real(4), intent (in) :: y
                                                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                      end function
                                                                                                      real(8) function fmax84(x, y) result(res)
                                                                                                          real(8), intent (in) :: x
                                                                                                          real(4), intent (in) :: y
                                                                                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                      end function
                                                                                                      real(8) function fmax48(x, y) result(res)
                                                                                                          real(4), intent (in) :: x
                                                                                                          real(8), intent (in) :: y
                                                                                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                      end function
                                                                                                      real(8) function fmin88(x, y) result (res)
                                                                                                          real(8), intent (in) :: x
                                                                                                          real(8), intent (in) :: y
                                                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                      end function
                                                                                                      real(4) function fmin44(x, y) result (res)
                                                                                                          real(4), intent (in) :: x
                                                                                                          real(4), intent (in) :: y
                                                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                      end function
                                                                                                      real(8) function fmin84(x, y) result(res)
                                                                                                          real(8), intent (in) :: x
                                                                                                          real(4), intent (in) :: y
                                                                                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                      end function
                                                                                                      real(8) function fmin48(x, y) result(res)
                                                                                                          real(4), intent (in) :: x
                                                                                                          real(8), intent (in) :: y
                                                                                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                      end function
                                                                                                  end module
                                                                                                  
                                                                                                  real(8) function code(x, y, z, t, a, b, c, i, j, 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) :: tmp
                                                                                                      t_1 = (j * 27.0d0) * k
                                                                                                      if ((t_1 <= (-2d+93)) .or. (.not. (t_1 <= 500000000.0d0))) then
                                                                                                          tmp = ((-27.0d0) * j) * k
                                                                                                      else
                                                                                                          tmp = ((-4.0d0) * a) * t
                                                                                                      end if
                                                                                                      code = tmp
                                                                                                  end function
                                                                                                  
                                                                                                  public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
                                                                                                  	double t_1 = (j * 27.0) * k;
                                                                                                  	double tmp;
                                                                                                  	if ((t_1 <= -2e+93) || !(t_1 <= 500000000.0)) {
                                                                                                  		tmp = (-27.0 * j) * k;
                                                                                                  	} else {
                                                                                                  		tmp = (-4.0 * a) * t;
                                                                                                  	}
                                                                                                  	return tmp;
                                                                                                  }
                                                                                                  
                                                                                                  def code(x, y, z, t, a, b, c, i, j, k):
                                                                                                  	t_1 = (j * 27.0) * k
                                                                                                  	tmp = 0
                                                                                                  	if (t_1 <= -2e+93) or not (t_1 <= 500000000.0):
                                                                                                  		tmp = (-27.0 * j) * k
                                                                                                  	else:
                                                                                                  		tmp = (-4.0 * a) * t
                                                                                                  	return tmp
                                                                                                  
                                                                                                  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 <= -2e+93) || !(t_1 <= 500000000.0))
                                                                                                  		tmp = Float64(Float64(-27.0 * j) * k);
                                                                                                  	else
                                                                                                  		tmp = Float64(Float64(-4.0 * a) * t);
                                                                                                  	end
                                                                                                  	return tmp
                                                                                                  end
                                                                                                  
                                                                                                  function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
                                                                                                  	t_1 = (j * 27.0) * k;
                                                                                                  	tmp = 0.0;
                                                                                                  	if ((t_1 <= -2e+93) || ~((t_1 <= 500000000.0)))
                                                                                                  		tmp = (-27.0 * j) * k;
                                                                                                  	else
                                                                                                  		tmp = (-4.0 * a) * t;
                                                                                                  	end
                                                                                                  	tmp_2 = tmp;
                                                                                                  end
                                                                                                  
                                                                                                  code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+93], N[Not[LessEqual[t$95$1, 500000000.0]], $MachinePrecision]], N[(N[(-27.0 * j), $MachinePrecision] * k), $MachinePrecision], N[(N[(-4.0 * a), $MachinePrecision] * t), $MachinePrecision]]]
                                                                                                  
                                                                                                  \begin{array}{l}
                                                                                                  
                                                                                                  \\
                                                                                                  \begin{array}{l}
                                                                                                  t_1 := \left(j \cdot 27\right) \cdot k\\
                                                                                                  \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+93} \lor \neg \left(t\_1 \leq 500000000\right):\\
                                                                                                  \;\;\;\;\left(-27 \cdot j\right) \cdot k\\
                                                                                                  
                                                                                                  \mathbf{else}:\\
                                                                                                  \;\;\;\;\left(-4 \cdot a\right) \cdot t\\
                                                                                                  
                                                                                                  
                                                                                                  \end{array}
                                                                                                  \end{array}
                                                                                                  
                                                                                                  Derivation
                                                                                                  1. Split input into 2 regimes
                                                                                                  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.00000000000000009e93 or 5e8 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

                                                                                                    1. Initial program 79.7%

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

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

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

                                                                                                        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                                                      3. lower-*.f6453.1

                                                                                                        \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                                                                                                    5. Applied rewrites53.1%

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

                                                                                                    if -2.00000000000000009e93 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 5e8

                                                                                                    1. Initial program 87.7%

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

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

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

                                                                                                        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                                                      3. lower-*.f644.1

                                                                                                        \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                                                                                                    5. Applied rewrites4.1%

                                                                                                      \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                                                    6. Taylor expanded in t around inf

                                                                                                      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
                                                                                                    7. Step-by-step derivation
                                                                                                      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                      \[\leadsto \left(-4 \cdot a\right) \cdot t \]
                                                                                                    10. Step-by-step derivation
                                                                                                      1. Applied rewrites30.4%

                                                                                                        \[\leadsto \left(-4 \cdot a\right) \cdot t \]
                                                                                                    11. Recombined 2 regimes into one program.
                                                                                                    12. Final simplification39.4%

                                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;\left(j \cdot 27\right) \cdot k \leq -2 \cdot 10^{+93} \lor \neg \left(\left(j \cdot 27\right) \cdot k \leq 500000000\right):\\ \;\;\;\;\left(-27 \cdot j\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;\left(-4 \cdot a\right) \cdot t\\ \end{array} \]
                                                                                                    13. Add Preprocessing

                                                                                                    Alternative 18: 72.5% accurate, 1.7× speedup?

                                                                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{+91} \lor \neg \left(t \leq 1.2 \cdot 10^{+49}\right):\\ \;\;\;\;\mathsf{fma}\left(z \cdot x, 18 \cdot y, a \cdot -4\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-4 \cdot i, x, \mathsf{fma}\left(-27, k \cdot j, b \cdot c\right)\right)\\ \end{array} \end{array} \]
                                                                                                    (FPCore (x y z t a b c i j k)
                                                                                                     :precision binary64
                                                                                                     (if (or (<= t -1e+91) (not (<= t 1.2e+49)))
                                                                                                       (* (fma (* z x) (* 18.0 y) (* a -4.0)) t)
                                                                                                       (fma (* -4.0 i) x (fma -27.0 (* k j) (* b c)))))
                                                                                                    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 <= -1e+91) || !(t <= 1.2e+49)) {
                                                                                                    		tmp = fma((z * x), (18.0 * y), (a * -4.0)) * t;
                                                                                                    	} else {
                                                                                                    		tmp = fma((-4.0 * i), x, fma(-27.0, (k * j), (b * c)));
                                                                                                    	}
                                                                                                    	return tmp;
                                                                                                    }
                                                                                                    
                                                                                                    function code(x, y, z, t, a, b, c, i, j, k)
                                                                                                    	tmp = 0.0
                                                                                                    	if ((t <= -1e+91) || !(t <= 1.2e+49))
                                                                                                    		tmp = Float64(fma(Float64(z * x), Float64(18.0 * y), Float64(a * -4.0)) * t);
                                                                                                    	else
                                                                                                    		tmp = fma(Float64(-4.0 * i), x, fma(-27.0, Float64(k * j), Float64(b * c)));
                                                                                                    	end
                                                                                                    	return tmp
                                                                                                    end
                                                                                                    
                                                                                                    code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -1e+91], N[Not[LessEqual[t, 1.2e+49]], $MachinePrecision]], N[(N[(N[(z * x), $MachinePrecision] * N[(18.0 * y), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(N[(-4.0 * i), $MachinePrecision] * x + N[(-27.0 * N[(k * j), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                                                    
                                                                                                    \begin{array}{l}
                                                                                                    
                                                                                                    \\
                                                                                                    \begin{array}{l}
                                                                                                    \mathbf{if}\;t \leq -1 \cdot 10^{+91} \lor \neg \left(t \leq 1.2 \cdot 10^{+49}\right):\\
                                                                                                    \;\;\;\;\mathsf{fma}\left(z \cdot x, 18 \cdot y, a \cdot -4\right) \cdot t\\
                                                                                                    
                                                                                                    \mathbf{else}:\\
                                                                                                    \;\;\;\;\mathsf{fma}\left(-4 \cdot i, x, \mathsf{fma}\left(-27, k \cdot j, b \cdot c\right)\right)\\
                                                                                                    
                                                                                                    
                                                                                                    \end{array}
                                                                                                    \end{array}
                                                                                                    
                                                                                                    Derivation
                                                                                                    1. Split input into 2 regimes
                                                                                                    2. if t < -1.00000000000000008e91 or 1.2e49 < t

                                                                                                      1. Initial program 84.8%

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

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

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

                                                                                                          \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                                                        3. lower-*.f6411.9

                                                                                                          \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                                                                                                      5. Applied rewrites11.9%

                                                                                                        \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                                                      6. Taylor expanded in t around inf

                                                                                                        \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
                                                                                                      7. Step-by-step derivation
                                                                                                        1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y \cdot z\right) \cdot x, 18, -4 \cdot a\right) \cdot t} \]
                                                                                                      9. Step-by-step derivation
                                                                                                        1. Applied rewrites77.3%

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

                                                                                                        if -1.00000000000000008e91 < t < 1.2e49

                                                                                                        1. Initial program 84.4%

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

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

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

                                                                                                            \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                                                          3. lower-*.f6431.0

                                                                                                            \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                                                                                                        5. Applied rewrites31.0%

                                                                                                          \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                                                        6. 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)} \]
                                                                                                        7. Step-by-step derivation
                                                                                                          1. associate--r+N/A

                                                                                                            \[\leadsto \color{blue}{\left(b \cdot c - 4 \cdot \left(i \cdot x\right)\right) - 27 \cdot \left(j \cdot k\right)} \]
                                                                                                          2. fp-cancel-sub-sign-invN/A

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

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

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

                                                                                                            \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right) + \left(b \cdot c - 27 \cdot \left(j \cdot k\right)\right)} \]
                                                                                                          6. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

                                                                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(-4 \cdot i, x, \mathsf{fma}\left(-27, k \cdot j, b \cdot c\right)\right)} \]
                                                                                                      10. Recombined 2 regimes into one program.
                                                                                                      11. Final simplification77.6%

                                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{+91} \lor \neg \left(t \leq 1.2 \cdot 10^{+49}\right):\\ \;\;\;\;\mathsf{fma}\left(z \cdot x, 18 \cdot y, a \cdot -4\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-4 \cdot i, x, \mathsf{fma}\left(-27, k \cdot j, b \cdot c\right)\right)\\ \end{array} \]
                                                                                                      12. Add Preprocessing

                                                                                                      Alternative 19: 48.1% accurate, 2.3× speedup?

                                                                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.75 \cdot 10^{+124} \lor \neg \left(t \leq 1.52 \cdot 10^{+64}\right):\\ \;\;\;\;\left(-4 \cdot a\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\ \end{array} \end{array} \]
                                                                                                      (FPCore (x y z t a b c i j k)
                                                                                                       :precision binary64
                                                                                                       (if (or (<= t -1.75e+124) (not (<= t 1.52e+64)))
                                                                                                         (* (* -4.0 a) t)
                                                                                                         (fma c b (* -27.0 (* 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.75e+124) || !(t <= 1.52e+64)) {
                                                                                                      		tmp = (-4.0 * a) * t;
                                                                                                      	} else {
                                                                                                      		tmp = fma(c, b, (-27.0 * (j * k)));
                                                                                                      	}
                                                                                                      	return tmp;
                                                                                                      }
                                                                                                      
                                                                                                      function code(x, y, z, t, a, b, c, i, j, k)
                                                                                                      	tmp = 0.0
                                                                                                      	if ((t <= -1.75e+124) || !(t <= 1.52e+64))
                                                                                                      		tmp = Float64(Float64(-4.0 * a) * t);
                                                                                                      	else
                                                                                                      		tmp = fma(c, b, Float64(-27.0 * Float64(j * k)));
                                                                                                      	end
                                                                                                      	return tmp
                                                                                                      end
                                                                                                      
                                                                                                      code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -1.75e+124], N[Not[LessEqual[t, 1.52e+64]], $MachinePrecision]], N[(N[(-4.0 * a), $MachinePrecision] * t), $MachinePrecision], N[(c * b + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                                                      
                                                                                                      \begin{array}{l}
                                                                                                      
                                                                                                      \\
                                                                                                      \begin{array}{l}
                                                                                                      \mathbf{if}\;t \leq -1.75 \cdot 10^{+124} \lor \neg \left(t \leq 1.52 \cdot 10^{+64}\right):\\
                                                                                                      \;\;\;\;\left(-4 \cdot a\right) \cdot t\\
                                                                                                      
                                                                                                      \mathbf{else}:\\
                                                                                                      \;\;\;\;\mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\
                                                                                                      
                                                                                                      
                                                                                                      \end{array}
                                                                                                      \end{array}
                                                                                                      
                                                                                                      Derivation
                                                                                                      1. Split input into 2 regimes
                                                                                                      2. if t < -1.7500000000000001e124 or 1.52e64 < t

                                                                                                        1. Initial program 82.9%

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

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

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

                                                                                                            \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                                                          3. lower-*.f6412.0

                                                                                                            \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                                                                                                        5. Applied rewrites12.0%

                                                                                                          \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                                                        6. Taylor expanded in t around inf

                                                                                                          \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
                                                                                                        7. Step-by-step derivation
                                                                                                          1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                          \[\leadsto \left(-4 \cdot a\right) \cdot t \]
                                                                                                        10. Step-by-step derivation
                                                                                                          1. Applied rewrites45.4%

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

                                                                                                          if -1.7500000000000001e124 < t < 1.52e64

                                                                                                          1. Initial program 85.4%

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

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

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

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

                                                                                                              \[\leadsto \color{blue}{\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right)} - 27 \cdot \left(j \cdot k\right) \]
                                                                                                            4. metadata-evalN/A

                                                                                                              \[\leadsto \left(b \cdot c + \color{blue}{-4} \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right) \]
                                                                                                            5. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                                                                                            \[\leadsto b \cdot c - \color{blue}{27 \cdot \left(j \cdot k\right)} \]
                                                                                                          7. Step-by-step derivation
                                                                                                            1. Applied rewrites52.6%

                                                                                                              \[\leadsto \mathsf{fma}\left(-27, \color{blue}{k \cdot j}, b \cdot c\right) \]
                                                                                                            2. Step-by-step derivation
                                                                                                              1. Applied rewrites53.2%

                                                                                                                \[\leadsto \mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right) \]
                                                                                                            3. Recombined 2 regimes into one program.
                                                                                                            4. Final simplification50.5%

                                                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.75 \cdot 10^{+124} \lor \neg \left(t \leq 1.52 \cdot 10^{+64}\right):\\ \;\;\;\;\left(-4 \cdot a\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c, b, -27 \cdot \left(j \cdot k\right)\right)\\ \end{array} \]
                                                                                                            5. Add Preprocessing

                                                                                                            Alternative 20: 47.8% accurate, 2.3× speedup?

                                                                                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.75 \cdot 10^{+124} \lor \neg \left(t \leq 1.52 \cdot 10^{+64}\right):\\ \;\;\;\;\left(-4 \cdot a\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-27, k \cdot j, b \cdot c\right)\\ \end{array} \end{array} \]
                                                                                                            (FPCore (x y z t a b c i j k)
                                                                                                             :precision binary64
                                                                                                             (if (or (<= t -1.75e+124) (not (<= t 1.52e+64)))
                                                                                                               (* (* -4.0 a) t)
                                                                                                               (fma -27.0 (* k j) (* b c))))
                                                                                                            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.75e+124) || !(t <= 1.52e+64)) {
                                                                                                            		tmp = (-4.0 * a) * t;
                                                                                                            	} else {
                                                                                                            		tmp = fma(-27.0, (k * j), (b * c));
                                                                                                            	}
                                                                                                            	return tmp;
                                                                                                            }
                                                                                                            
                                                                                                            function code(x, y, z, t, a, b, c, i, j, k)
                                                                                                            	tmp = 0.0
                                                                                                            	if ((t <= -1.75e+124) || !(t <= 1.52e+64))
                                                                                                            		tmp = Float64(Float64(-4.0 * a) * t);
                                                                                                            	else
                                                                                                            		tmp = fma(-27.0, Float64(k * j), Float64(b * c));
                                                                                                            	end
                                                                                                            	return tmp
                                                                                                            end
                                                                                                            
                                                                                                            code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -1.75e+124], N[Not[LessEqual[t, 1.52e+64]], $MachinePrecision]], N[(N[(-4.0 * a), $MachinePrecision] * t), $MachinePrecision], N[(-27.0 * N[(k * j), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]]
                                                                                                            
                                                                                                            \begin{array}{l}
                                                                                                            
                                                                                                            \\
                                                                                                            \begin{array}{l}
                                                                                                            \mathbf{if}\;t \leq -1.75 \cdot 10^{+124} \lor \neg \left(t \leq 1.52 \cdot 10^{+64}\right):\\
                                                                                                            \;\;\;\;\left(-4 \cdot a\right) \cdot t\\
                                                                                                            
                                                                                                            \mathbf{else}:\\
                                                                                                            \;\;\;\;\mathsf{fma}\left(-27, k \cdot j, b \cdot c\right)\\
                                                                                                            
                                                                                                            
                                                                                                            \end{array}
                                                                                                            \end{array}
                                                                                                            
                                                                                                            Derivation
                                                                                                            1. Split input into 2 regimes
                                                                                                            2. if t < -1.7500000000000001e124 or 1.52e64 < t

                                                                                                              1. Initial program 82.9%

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

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

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

                                                                                                                  \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                                                                3. lower-*.f6412.0

                                                                                                                  \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                                                                                                              5. Applied rewrites12.0%

                                                                                                                \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                                                              6. Taylor expanded in t around inf

                                                                                                                \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
                                                                                                              7. Step-by-step derivation
                                                                                                                1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                \[\leadsto \left(-4 \cdot a\right) \cdot t \]
                                                                                                              10. Step-by-step derivation
                                                                                                                1. Applied rewrites45.4%

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

                                                                                                                if -1.7500000000000001e124 < t < 1.52e64

                                                                                                                1. Initial program 85.4%

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

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

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

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

                                                                                                                    \[\leadsto \color{blue}{\left(b \cdot c + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right)} - 27 \cdot \left(j \cdot k\right) \]
                                                                                                                  4. metadata-evalN/A

                                                                                                                    \[\leadsto \left(b \cdot c + \color{blue}{-4} \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right) \]
                                                                                                                  5. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                  \[\leadsto b \cdot c - \color{blue}{27 \cdot \left(j \cdot k\right)} \]
                                                                                                                7. Step-by-step derivation
                                                                                                                  1. Applied rewrites52.6%

                                                                                                                    \[\leadsto \mathsf{fma}\left(-27, \color{blue}{k \cdot j}, b \cdot c\right) \]
                                                                                                                8. Recombined 2 regimes into one program.
                                                                                                                9. Final simplification50.1%

                                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.75 \cdot 10^{+124} \lor \neg \left(t \leq 1.52 \cdot 10^{+64}\right):\\ \;\;\;\;\left(-4 \cdot a\right) \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-27, k \cdot j, b \cdot c\right)\\ \end{array} \]
                                                                                                                10. Add Preprocessing

                                                                                                                Alternative 21: 21.2% accurate, 6.2× speedup?

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

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

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

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

                                                                                                                    \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                                                                  3. lower-*.f6423.6

                                                                                                                    \[\leadsto \color{blue}{\left(-27 \cdot j\right)} \cdot k \]
                                                                                                                5. Applied rewrites23.6%

                                                                                                                  \[\leadsto \color{blue}{\left(-27 \cdot j\right) \cdot k} \]
                                                                                                                6. Taylor expanded in t around inf

                                                                                                                  \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)} \]
                                                                                                                7. Step-by-step derivation
                                                                                                                  1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                  \[\leadsto \left(-4 \cdot a\right) \cdot t \]
                                                                                                                10. Step-by-step derivation
                                                                                                                  1. Applied rewrites21.8%

                                                                                                                    \[\leadsto \left(-4 \cdot a\right) \cdot t \]
                                                                                                                  2. Add Preprocessing

                                                                                                                  Developer Target 1: 88.7% accurate, 0.9× speedup?

                                                                                                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\ t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\ \mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t < 165.68027943805222:\\ \;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                                                                                                  (FPCore (x y z t a b c i j k)
                                                                                                                   :precision binary64
                                                                                                                   (let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
                                                                                                                          (t_2
                                                                                                                           (-
                                                                                                                            (- (* (* 18.0 t) (* (* x y) z)) t_1)
                                                                                                                            (- (* (* k j) 27.0) (* c b)))))
                                                                                                                     (if (< t -1.6210815397541398e-69)
                                                                                                                       t_2
                                                                                                                       (if (< t 165.68027943805222)
                                                                                                                         (+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
                                                                                                                         t_2))))
                                                                                                                  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 = ((a * t) + (i * x)) * 4.0;
                                                                                                                  	double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
                                                                                                                  	double tmp;
                                                                                                                  	if (t < -1.6210815397541398e-69) {
                                                                                                                  		tmp = t_2;
                                                                                                                  	} else if (t < 165.68027943805222) {
                                                                                                                  		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
                                                                                                                  	} else {
                                                                                                                  		tmp = t_2;
                                                                                                                  	}
                                                                                                                  	return tmp;
                                                                                                                  }
                                                                                                                  
                                                                                                                  module fmin_fmax_functions
                                                                                                                      implicit none
                                                                                                                      private
                                                                                                                      public fmax
                                                                                                                      public fmin
                                                                                                                  
                                                                                                                      interface fmax
                                                                                                                          module procedure fmax88
                                                                                                                          module procedure fmax44
                                                                                                                          module procedure fmax84
                                                                                                                          module procedure fmax48
                                                                                                                      end interface
                                                                                                                      interface fmin
                                                                                                                          module procedure fmin88
                                                                                                                          module procedure fmin44
                                                                                                                          module procedure fmin84
                                                                                                                          module procedure fmin48
                                                                                                                      end interface
                                                                                                                  contains
                                                                                                                      real(8) function fmax88(x, y) result (res)
                                                                                                                          real(8), intent (in) :: x
                                                                                                                          real(8), intent (in) :: y
                                                                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                      end function
                                                                                                                      real(4) function fmax44(x, y) result (res)
                                                                                                                          real(4), intent (in) :: x
                                                                                                                          real(4), intent (in) :: y
                                                                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                      end function
                                                                                                                      real(8) function fmax84(x, y) result(res)
                                                                                                                          real(8), intent (in) :: x
                                                                                                                          real(4), intent (in) :: y
                                                                                                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                      end function
                                                                                                                      real(8) function fmax48(x, y) result(res)
                                                                                                                          real(4), intent (in) :: x
                                                                                                                          real(8), intent (in) :: y
                                                                                                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                      end function
                                                                                                                      real(8) function fmin88(x, y) result (res)
                                                                                                                          real(8), intent (in) :: x
                                                                                                                          real(8), intent (in) :: y
                                                                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                      end function
                                                                                                                      real(4) function fmin44(x, y) result (res)
                                                                                                                          real(4), intent (in) :: x
                                                                                                                          real(4), intent (in) :: y
                                                                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                      end function
                                                                                                                      real(8) function fmin84(x, y) result(res)
                                                                                                                          real(8), intent (in) :: x
                                                                                                                          real(4), intent (in) :: y
                                                                                                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                      end function
                                                                                                                      real(8) function fmin48(x, y) result(res)
                                                                                                                          real(4), intent (in) :: x
                                                                                                                          real(8), intent (in) :: y
                                                                                                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                      end function
                                                                                                                  end module
                                                                                                                  
                                                                                                                  real(8) function code(x, y, z, t, a, b, c, i, j, 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 = ((a * t) + (i * x)) * 4.0d0
                                                                                                                      t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
                                                                                                                      if (t < (-1.6210815397541398d-69)) then
                                                                                                                          tmp = t_2
                                                                                                                      else if (t < 165.68027943805222d0) then
                                                                                                                          tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
                                                                                                                      else
                                                                                                                          tmp = t_2
                                                                                                                      end if
                                                                                                                      code = tmp
                                                                                                                  end function
                                                                                                                  
                                                                                                                  public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
                                                                                                                  	double t_1 = ((a * t) + (i * x)) * 4.0;
                                                                                                                  	double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
                                                                                                                  	double tmp;
                                                                                                                  	if (t < -1.6210815397541398e-69) {
                                                                                                                  		tmp = t_2;
                                                                                                                  	} else if (t < 165.68027943805222) {
                                                                                                                  		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
                                                                                                                  	} else {
                                                                                                                  		tmp = t_2;
                                                                                                                  	}
                                                                                                                  	return tmp;
                                                                                                                  }
                                                                                                                  
                                                                                                                  def code(x, y, z, t, a, b, c, i, j, k):
                                                                                                                  	t_1 = ((a * t) + (i * x)) * 4.0
                                                                                                                  	t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b))
                                                                                                                  	tmp = 0
                                                                                                                  	if t < -1.6210815397541398e-69:
                                                                                                                  		tmp = t_2
                                                                                                                  	elif t < 165.68027943805222:
                                                                                                                  		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)))
                                                                                                                  	else:
                                                                                                                  		tmp = t_2
                                                                                                                  	return tmp
                                                                                                                  
                                                                                                                  function code(x, y, z, t, a, b, c, i, j, k)
                                                                                                                  	t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0)
                                                                                                                  	t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b)))
                                                                                                                  	tmp = 0.0
                                                                                                                  	if (t < -1.6210815397541398e-69)
                                                                                                                  		tmp = t_2;
                                                                                                                  	elseif (t < 165.68027943805222)
                                                                                                                  		tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j))));
                                                                                                                  	else
                                                                                                                  		tmp = t_2;
                                                                                                                  	end
                                                                                                                  	return tmp
                                                                                                                  end
                                                                                                                  
                                                                                                                  function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
                                                                                                                  	t_1 = ((a * t) + (i * x)) * 4.0;
                                                                                                                  	t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
                                                                                                                  	tmp = 0.0;
                                                                                                                  	if (t < -1.6210815397541398e-69)
                                                                                                                  		tmp = t_2;
                                                                                                                  	elseif (t < 165.68027943805222)
                                                                                                                  		tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
                                                                                                                  	else
                                                                                                                  		tmp = t_2;
                                                                                                                  	end
                                                                                                                  	tmp_2 = tmp;
                                                                                                                  end
                                                                                                                  
                                                                                                                  code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
                                                                                                                  
                                                                                                                  \begin{array}{l}
                                                                                                                  
                                                                                                                  \\
                                                                                                                  \begin{array}{l}
                                                                                                                  t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
                                                                                                                  t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
                                                                                                                  \mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
                                                                                                                  \;\;\;\;t\_2\\
                                                                                                                  
                                                                                                                  \mathbf{elif}\;t < 165.68027943805222:\\
                                                                                                                  \;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
                                                                                                                  
                                                                                                                  \mathbf{else}:\\
                                                                                                                  \;\;\;\;t\_2\\
                                                                                                                  
                                                                                                                  
                                                                                                                  \end{array}
                                                                                                                  \end{array}
                                                                                                                  

                                                                                                                  Reproduce

                                                                                                                  ?
                                                                                                                  herbie shell --seed 2024352 
                                                                                                                  (FPCore (x y z t a b c i j k)
                                                                                                                    :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, E"
                                                                                                                    :precision binary64
                                                                                                                  
                                                                                                                    :alt
                                                                                                                    (! :herbie-platform default (if (< t -8105407698770699/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))) (if (< t 8284013971902611/50000000000000) (+ (- (* (* 18 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4)) (- (* c b) (* 27 (* k j)))) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))))))
                                                                                                                  
                                                                                                                    (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))