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

Percentage Accurate: 84.9% → 91.7%
Time: 33.3s
Alternatives: 20
Speedup: 1.2×

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);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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 20 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);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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: 91.7% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(c, b, \mathsf{fma}\left(k, j \cdot -27, t \cdot \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -4 \cdot a\right)\right)\right)\\ \mathbf{if}\;t \leq -2.9 \cdot 10^{+182}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{+67}:\\ \;\;\;\;\mathsf{fma}\left(y, \left(x \cdot 18\right) \cdot \left(t \cdot z\right), \mathsf{fma}\left(t, -4 \cdot a, \mathsf{fma}\left(b, c, x \cdot \left(-4 \cdot i\right)\right)\right)\right) - k \cdot \left(j \cdot 27\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
          (fma k (* j -27.0) (* t (fma x (* 18.0 (* y z)) (* -4.0 a)))))))
   (if (<= t -2.9e+182)
     t_1
     (if (<= t 5.4e+67)
       (-
        (fma
         y
         (* (* x 18.0) (* t z))
         (fma t (* -4.0 a) (fma b c (* x (* -4.0 i)))))
        (* k (* j 27.0)))
       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, fma(k, (j * -27.0), (t * fma(x, (18.0 * (y * z)), (-4.0 * a)))));
	double tmp;
	if (t <= -2.9e+182) {
		tmp = t_1;
	} else if (t <= 5.4e+67) {
		tmp = fma(y, ((x * 18.0) * (t * z)), fma(t, (-4.0 * a), fma(b, c, (x * (-4.0 * i))))) - (k * (j * 27.0));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = fma(c, b, fma(k, Float64(j * -27.0), Float64(t * fma(x, Float64(18.0 * Float64(y * z)), Float64(-4.0 * a)))))
	tmp = 0.0
	if (t <= -2.9e+182)
		tmp = t_1;
	elseif (t <= 5.4e+67)
		tmp = Float64(fma(y, Float64(Float64(x * 18.0) * Float64(t * z)), fma(t, Float64(-4.0 * a), fma(b, c, Float64(x * Float64(-4.0 * i))))) - Float64(k * Float64(j * 27.0)));
	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[(k * N[(j * -27.0), $MachinePrecision] + N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.9e+182], t$95$1, If[LessEqual[t, 5.4e+67], N[(N[(y * N[(N[(x * 18.0), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(t * N[(-4.0 * a), $MachinePrecision] + N[(b * c + N[(x * N[(-4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(c, b, \mathsf{fma}\left(k, j \cdot -27, t \cdot \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -4 \cdot a\right)\right)\right)\\
\mathbf{if}\;t \leq -2.9 \cdot 10^{+182}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.8999999999999998e182 or 5.3999999999999998e67 < t

    1. Initial program 70.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 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. 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) - 4 \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\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) - 27 \cdot \left(j \cdot k\right) \]
      3. associate--l+N/A

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

        \[\leadsto \color{blue}{\left(\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)} - 27 \cdot \left(j \cdot k\right) \]
      5. associate--l+N/A

        \[\leadsto \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) + \left(b \cdot c - 27 \cdot \left(j \cdot k\right)\right)} \]
      6. *-commutativeN/A

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

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

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

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

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

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

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

    if -2.8999999999999998e182 < t < 5.3999999999999998e67

    1. Initial program 88.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. Applied egg-rr94.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{+182}:\\ \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(k, j \cdot -27, t \cdot \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -4 \cdot a\right)\right)\right)\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{+67}:\\ \;\;\;\;\mathsf{fma}\left(y, \left(x \cdot 18\right) \cdot \left(t \cdot z\right), \mathsf{fma}\left(t, -4 \cdot a, \mathsf{fma}\left(b, c, x \cdot \left(-4 \cdot i\right)\right)\right)\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(k, j \cdot -27, t \cdot \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -4 \cdot a\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 91.0% accurate, 0.5× speedup?

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

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

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


\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 96.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. Applied egg-rr92.2%

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

        \[\leadsto \left(\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) - 27 \cdot \left(j \cdot k\right) \]
      3. associate--l+N/A

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

        \[\leadsto \color{blue}{\left(\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)} - 27 \cdot \left(j \cdot k\right) \]
      5. associate--l+N/A

        \[\leadsto \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) + \left(b \cdot c - 27 \cdot \left(j \cdot k\right)\right)} \]
      6. *-commutativeN/A

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

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

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

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

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

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

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

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

Alternative 3: 79.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\left(\left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right) + c \cdot b\right) - i \cdot \left(x \cdot 4\right) \leq 10^{+294}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, \mathsf{fma}\left(a, t, x \cdot i\right), j \cdot \left(k \cdot -27\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.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)) < 1.00000000000000007e294

    1. Initial program 93.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 y around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000007e294 < (-.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))

    1. Initial program 58.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 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. 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) - 4 \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\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) - 27 \cdot \left(j \cdot k\right) \]
      3. associate--l+N/A

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

        \[\leadsto \color{blue}{\left(\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)} - 27 \cdot \left(j \cdot k\right) \]
      5. associate--l+N/A

        \[\leadsto \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) + \left(b \cdot c - 27 \cdot \left(j \cdot k\right)\right)} \]
      6. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 35.3% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -27 \cdot \left(k \cdot j\right)\\ t_2 := k \cdot \left(j \cdot 27\right)\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+72}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-283}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;t\_2 \leq 10^{+216}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\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 (* -27.0 (* k j))) (t_2 (* k (* j 27.0))))
   (if (<= t_2 -2e+72)
     t_1
     (if (<= t_2 -4e-283) (* c b) (if (<= t_2 1e+216) (* -4.0 (* t a)) 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 * (k * j);
	double t_2 = k * (j * 27.0);
	double tmp;
	if (t_2 <= -2e+72) {
		tmp = t_1;
	} else if (t_2 <= -4e-283) {
		tmp = c * b;
	} else if (t_2 <= 1e+216) {
		tmp = -4.0 * (t * a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (-27.0d0) * (k * j)
    t_2 = k * (j * 27.0d0)
    if (t_2 <= (-2d+72)) then
        tmp = t_1
    else if (t_2 <= (-4d-283)) then
        tmp = c * b
    else if (t_2 <= 1d+216) then
        tmp = (-4.0d0) * (t * a)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = -27.0 * (k * j);
	double t_2 = k * (j * 27.0);
	double tmp;
	if (t_2 <= -2e+72) {
		tmp = t_1;
	} else if (t_2 <= -4e-283) {
		tmp = c * b;
	} else if (t_2 <= 1e+216) {
		tmp = -4.0 * (t * a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = -27.0 * (k * j)
	t_2 = k * (j * 27.0)
	tmp = 0
	if t_2 <= -2e+72:
		tmp = t_1
	elif t_2 <= -4e-283:
		tmp = c * b
	elif t_2 <= 1e+216:
		tmp = -4.0 * (t * a)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(-27.0 * Float64(k * j))
	t_2 = Float64(k * Float64(j * 27.0))
	tmp = 0.0
	if (t_2 <= -2e+72)
		tmp = t_1;
	elseif (t_2 <= -4e-283)
		tmp = Float64(c * b);
	elseif (t_2 <= 1e+216)
		tmp = Float64(-4.0 * Float64(t * a));
	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 * (k * j);
	t_2 = k * (j * 27.0);
	tmp = 0.0;
	if (t_2 <= -2e+72)
		tmp = t_1;
	elseif (t_2 <= -4e-283)
		tmp = c * b;
	elseif (t_2 <= 1e+216)
		tmp = -4.0 * (t * a);
	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[(-27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+72], t$95$1, If[LessEqual[t$95$2, -4e-283], N[(c * b), $MachinePrecision], If[LessEqual[t$95$2, 1e+216], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := -27 \cdot \left(k \cdot j\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-283}:\\
\;\;\;\;c \cdot b\\

\mathbf{elif}\;t\_2 \leq 10^{+216}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\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.99999999999999989e72 or 1e216 < (*.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999989e72 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -3.99999999999999979e-283

    1. Initial program 84.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 b around inf

      \[\leadsto \color{blue}{b \cdot c} \]
    4. Step-by-step derivation
      1. lower-*.f6434.9

        \[\leadsto \color{blue}{b \cdot c} \]
    5. Simplified34.9%

      \[\leadsto \color{blue}{b \cdot c} \]

    if -3.99999999999999979e-283 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1e216

    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. Taylor expanded in a around inf

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

        \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
      2. lower-*.f6432.5

        \[\leadsto -4 \cdot \color{blue}{\left(a \cdot t\right)} \]
    5. Simplified32.5%

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification40.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \cdot \left(j \cdot 27\right) \leq -2 \cdot 10^{+72}:\\ \;\;\;\;-27 \cdot \left(k \cdot j\right)\\ \mathbf{elif}\;k \cdot \left(j \cdot 27\right) \leq -4 \cdot 10^{-283}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;k \cdot \left(j \cdot 27\right) \leq 10^{+216}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(k \cdot j\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 35.3% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := k \cdot \left(j \cdot 27\right)\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+72}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;t\_1 \leq -4 \cdot 10^{-283}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;t\_1 \leq 10^{+216}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* k (* j 27.0))))
   (if (<= t_1 -2e+72)
     (* k (* j -27.0))
     (if (<= t_1 -4e-283)
       (* c b)
       (if (<= t_1 1e+216) (* -4.0 (* t a)) (* j (* k -27.0)))))))
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 = k * (j * 27.0);
	double tmp;
	if (t_1 <= -2e+72) {
		tmp = k * (j * -27.0);
	} else if (t_1 <= -4e-283) {
		tmp = c * b;
	} else if (t_1 <= 1e+216) {
		tmp = -4.0 * (t * a);
	} else {
		tmp = j * (k * -27.0);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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 = k * (j * 27.0d0)
    if (t_1 <= (-2d+72)) then
        tmp = k * (j * (-27.0d0))
    else if (t_1 <= (-4d-283)) then
        tmp = c * b
    else if (t_1 <= 1d+216) then
        tmp = (-4.0d0) * (t * a)
    else
        tmp = j * (k * (-27.0d0))
    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 = k * (j * 27.0);
	double tmp;
	if (t_1 <= -2e+72) {
		tmp = k * (j * -27.0);
	} else if (t_1 <= -4e-283) {
		tmp = c * b;
	} else if (t_1 <= 1e+216) {
		tmp = -4.0 * (t * a);
	} else {
		tmp = j * (k * -27.0);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = k * (j * 27.0)
	tmp = 0
	if t_1 <= -2e+72:
		tmp = k * (j * -27.0)
	elif t_1 <= -4e-283:
		tmp = c * b
	elif t_1 <= 1e+216:
		tmp = -4.0 * (t * a)
	else:
		tmp = j * (k * -27.0)
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(k * Float64(j * 27.0))
	tmp = 0.0
	if (t_1 <= -2e+72)
		tmp = Float64(k * Float64(j * -27.0));
	elseif (t_1 <= -4e-283)
		tmp = Float64(c * b);
	elseif (t_1 <= 1e+216)
		tmp = Float64(-4.0 * Float64(t * a));
	else
		tmp = Float64(j * Float64(k * -27.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = k * (j * 27.0);
	tmp = 0.0;
	if (t_1 <= -2e+72)
		tmp = k * (j * -27.0);
	elseif (t_1 <= -4e-283)
		tmp = c * b;
	elseif (t_1 <= 1e+216)
		tmp = -4.0 * (t * a);
	else
		tmp = j * (k * -27.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+72], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -4e-283], N[(c * b), $MachinePrecision], If[LessEqual[t$95$1, 1e+216], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+72}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\

\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{-283}:\\
\;\;\;\;c \cdot b\\

\mathbf{elif}\;t\_1 \leq 10^{+216}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\

\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.99999999999999989e72

    1. Initial program 70.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999989e72 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -3.99999999999999979e-283

    1. Initial program 84.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 b around inf

      \[\leadsto \color{blue}{b \cdot c} \]
    4. Step-by-step derivation
      1. lower-*.f6434.9

        \[\leadsto \color{blue}{b \cdot c} \]
    5. Simplified34.9%

      \[\leadsto \color{blue}{b \cdot c} \]

    if -3.99999999999999979e-283 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1e216

    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. Taylor expanded in a around inf

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

        \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
      2. lower-*.f6432.5

        \[\leadsto -4 \cdot \color{blue}{\left(a \cdot t\right)} \]
    5. Simplified32.5%

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

    if 1e216 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    1. Initial program 81.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. *-commutativeN/A

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

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

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

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

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

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

      \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification40.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \cdot \left(j \cdot 27\right) \leq -2 \cdot 10^{+72}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;k \cdot \left(j \cdot 27\right) \leq -4 \cdot 10^{-283}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;k \cdot \left(j \cdot 27\right) \leq 10^{+216}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 35.3% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := k \cdot \left(j \cdot 27\right)\\ \mathbf{if}\;t\_2 \leq -2 \cdot 10^{+72}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-283}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;t\_2 \leq 10^{+216}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\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 (* j (* k -27.0))) (t_2 (* k (* j 27.0))))
   (if (<= t_2 -2e+72)
     t_1
     (if (<= t_2 -4e-283) (* c b) (if (<= t_2 1e+216) (* -4.0 (* t a)) 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 = j * (k * -27.0);
	double t_2 = k * (j * 27.0);
	double tmp;
	if (t_2 <= -2e+72) {
		tmp = t_1;
	} else if (t_2 <= -4e-283) {
		tmp = c * b;
	} else if (t_2 <= 1e+216) {
		tmp = -4.0 * (t * a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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 = j * (k * (-27.0d0))
    t_2 = k * (j * 27.0d0)
    if (t_2 <= (-2d+72)) then
        tmp = t_1
    else if (t_2 <= (-4d-283)) then
        tmp = c * b
    else if (t_2 <= 1d+216) then
        tmp = (-4.0d0) * (t * a)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double t_2 = k * (j * 27.0);
	double tmp;
	if (t_2 <= -2e+72) {
		tmp = t_1;
	} else if (t_2 <= -4e-283) {
		tmp = c * b;
	} else if (t_2 <= 1e+216) {
		tmp = -4.0 * (t * a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = k * (j * 27.0)
	tmp = 0
	if t_2 <= -2e+72:
		tmp = t_1
	elif t_2 <= -4e-283:
		tmp = c * b
	elif t_2 <= 1e+216:
		tmp = -4.0 * (t * a)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(j * Float64(k * -27.0))
	t_2 = Float64(k * Float64(j * 27.0))
	tmp = 0.0
	if (t_2 <= -2e+72)
		tmp = t_1;
	elseif (t_2 <= -4e-283)
		tmp = Float64(c * b);
	elseif (t_2 <= 1e+216)
		tmp = Float64(-4.0 * Float64(t * a));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = j * (k * -27.0);
	t_2 = k * (j * 27.0);
	tmp = 0.0;
	if (t_2 <= -2e+72)
		tmp = t_1;
	elseif (t_2 <= -4e-283)
		tmp = c * b;
	elseif (t_2 <= 1e+216)
		tmp = -4.0 * (t * a);
	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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+72], t$95$1, If[LessEqual[t$95$2, -4e-283], N[(c * b), $MachinePrecision], If[LessEqual[t$95$2, 1e+216], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-283}:\\
\;\;\;\;c \cdot b\\

\mathbf{elif}\;t\_2 \leq 10^{+216}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\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.99999999999999989e72 or 1e216 < (*.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. *-commutativeN/A

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

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

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

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

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

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

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

    if -1.99999999999999989e72 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -3.99999999999999979e-283

    1. Initial program 84.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 b around inf

      \[\leadsto \color{blue}{b \cdot c} \]
    4. Step-by-step derivation
      1. lower-*.f6434.9

        \[\leadsto \color{blue}{b \cdot c} \]
    5. Simplified34.9%

      \[\leadsto \color{blue}{b \cdot c} \]

    if -3.99999999999999979e-283 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1e216

    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. Taylor expanded in a around inf

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

        \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
      2. lower-*.f6432.5

        \[\leadsto -4 \cdot \color{blue}{\left(a \cdot t\right)} \]
    5. Simplified32.5%

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification40.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \cdot \left(j \cdot 27\right) \leq -2 \cdot 10^{+72}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;k \cdot \left(j \cdot 27\right) \leq -4 \cdot 10^{-283}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;k \cdot \left(j \cdot 27\right) \leq 10^{+216}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 58.0% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\\ t_2 := x \cdot \mathsf{fma}\left(-4, i, t\_1\right)\\ \mathbf{if}\;x \leq -1.8 \cdot 10^{+164}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -1.12 \cdot 10^{+52}:\\ \;\;\;\;\mathsf{fma}\left(c, b, x \cdot t\_1\right)\\ \mathbf{elif}\;x \leq -2.2 \cdot 10^{-107}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot j, -27, c \cdot b\right)\\ \mathbf{elif}\;x \leq 4 \cdot 10^{-208}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot j, -27, a \cdot \left(t \cdot -4\right)\right)\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+23}:\\ \;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\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 (* t (* 18.0 (* y z)))) (t_2 (* x (fma -4.0 i t_1))))
   (if (<= x -1.8e+164)
     t_2
     (if (<= x -1.12e+52)
       (fma c b (* x t_1))
       (if (<= x -2.2e-107)
         (fma (* k j) -27.0 (* c b))
         (if (<= x 4e-208)
           (fma (* k j) -27.0 (* a (* t -4.0)))
           (if (<= x 9.5e+23) (fma b c (* -4.0 (* t a))) 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 = t * (18.0 * (y * z));
	double t_2 = x * fma(-4.0, i, t_1);
	double tmp;
	if (x <= -1.8e+164) {
		tmp = t_2;
	} else if (x <= -1.12e+52) {
		tmp = fma(c, b, (x * t_1));
	} else if (x <= -2.2e-107) {
		tmp = fma((k * j), -27.0, (c * b));
	} else if (x <= 4e-208) {
		tmp = fma((k * j), -27.0, (a * (t * -4.0)));
	} else if (x <= 9.5e+23) {
		tmp = fma(b, c, (-4.0 * (t * a)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(t * Float64(18.0 * Float64(y * z)))
	t_2 = Float64(x * fma(-4.0, i, t_1))
	tmp = 0.0
	if (x <= -1.8e+164)
		tmp = t_2;
	elseif (x <= -1.12e+52)
		tmp = fma(c, b, Float64(x * t_1));
	elseif (x <= -2.2e-107)
		tmp = fma(Float64(k * j), -27.0, Float64(c * b));
	elseif (x <= 4e-208)
		tmp = fma(Float64(k * j), -27.0, Float64(a * Float64(t * -4.0)));
	elseif (x <= 9.5e+23)
		tmp = fma(b, c, Float64(-4.0 * Float64(t * a)));
	else
		tmp = t_2;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(-4.0 * i + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.8e+164], t$95$2, If[LessEqual[x, -1.12e+52], N[(c * b + N[(x * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.2e-107], N[(N[(k * j), $MachinePrecision] * -27.0 + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4e-208], N[(N[(k * j), $MachinePrecision] * -27.0 + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.5e+23], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\\
t_2 := x \cdot \mathsf{fma}\left(-4, i, t\_1\right)\\
\mathbf{if}\;x \leq -1.8 \cdot 10^{+164}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq -1.12 \cdot 10^{+52}:\\
\;\;\;\;\mathsf{fma}\left(c, b, x \cdot t\_1\right)\\

\mathbf{elif}\;x \leq -2.2 \cdot 10^{-107}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot j, -27, c \cdot b\right)\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if x < -1.79999999999999995e164 or 9.50000000000000038e23 < x

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

        \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
      2. cancel-sign-sub-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)} \]
      3. metadata-evalN/A

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

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

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

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

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

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

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

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

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

    if -1.79999999999999995e164 < x < -1.12000000000000002e52

    1. Initial program 79.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 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. 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) - 4 \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\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) - 27 \cdot \left(j \cdot k\right) \]
      3. associate--l+N/A

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

        \[\leadsto \color{blue}{\left(\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)} - 27 \cdot \left(j \cdot k\right) \]
      5. associate--l+N/A

        \[\leadsto \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) + \left(b \cdot c - 27 \cdot \left(j \cdot k\right)\right)} \]
      6. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(c, b, x \cdot \left(t \cdot \color{blue}{\left(18 \cdot \left(y \cdot z\right)\right)}\right)\right) \]
      11. lower-*.f6475.7

        \[\leadsto \mathsf{fma}\left(c, b, x \cdot \left(t \cdot \left(18 \cdot \color{blue}{\left(y \cdot z\right)}\right)\right)\right) \]
    9. Simplified75.7%

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

    if -1.12000000000000002e52 < x < -2.20000000000000012e-107

    1. Initial program 89.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 b around inf

      \[\leadsto \color{blue}{b \cdot c} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. lower-*.f6463.3

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

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

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

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

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

        \[\leadsto b \cdot c + \left(\mathsf{neg}\left(\color{blue}{j \cdot 27}\right)\right) \cdot k \]
      5. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto b \cdot c + j \cdot \color{blue}{\left(k \cdot -27\right)} \]
      9. lift-*.f64N/A

        \[\leadsto b \cdot c + j \cdot \color{blue}{\left(k \cdot -27\right)} \]
      10. lift-*.f64N/A

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

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right) + b \cdot c} \]
      12. lift-*.f64N/A

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right)} + b \cdot c \]
      13. lift-*.f64N/A

        \[\leadsto j \cdot \color{blue}{\left(k \cdot -27\right)} + b \cdot c \]
      14. associate-*r*N/A

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

        \[\leadsto \color{blue}{\left(k \cdot j\right)} \cdot -27 + b \cdot c \]
      16. lift-*.f64N/A

        \[\leadsto \color{blue}{\left(k \cdot j\right)} \cdot -27 + b \cdot c \]
      17. lower-fma.f6463.5

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

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

    if -2.20000000000000012e-107 < x < 4.0000000000000004e-208

    1. Initial program 91.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. Applied egg-rr79.9%

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

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

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

        \[\leadsto \mathsf{fma}\left(k \cdot j, -27, \color{blue}{\left(a \cdot -4\right)} \cdot t\right) \]
      3. associate-*r*N/A

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

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

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

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

    if 4.0000000000000004e-208 < x < 9.50000000000000038e23

    1. Initial program 91.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 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. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \color{blue}{\left(a \cdot t\right)}\right) \]
    8. Simplified60.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.8 \cdot 10^{+164}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;x \leq -1.12 \cdot 10^{+52}:\\ \;\;\;\;\mathsf{fma}\left(c, b, x \cdot \left(t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\right)\\ \mathbf{elif}\;x \leq -2.2 \cdot 10^{-107}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot j, -27, c \cdot b\right)\\ \mathbf{elif}\;x \leq 4 \cdot 10^{-208}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot j, -27, a \cdot \left(t \cdot -4\right)\right)\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{+23}:\\ \;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 86.4% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(c, b, \mathsf{fma}\left(k, j \cdot -27, t \cdot \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -4 \cdot a\right)\right)\right)\\ \mathbf{if}\;t \leq -9.2 \cdot 10^{+36}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 6.4 \cdot 10^{-48}:\\ \;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, \mathsf{fma}\left(a, t, x \cdot i\right), j \cdot \left(k \cdot -27\right)\right)\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
          (fma k (* j -27.0) (* t (fma x (* 18.0 (* y z)) (* -4.0 a)))))))
   (if (<= t -9.2e+36)
     t_1
     (if (<= t 6.4e-48)
       (fma b c (fma -4.0 (fma a t (* x i)) (* j (* k -27.0))))
       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, fma(k, (j * -27.0), (t * fma(x, (18.0 * (y * z)), (-4.0 * a)))));
	double tmp;
	if (t <= -9.2e+36) {
		tmp = t_1;
	} else if (t <= 6.4e-48) {
		tmp = fma(b, c, fma(-4.0, fma(a, t, (x * i)), (j * (k * -27.0))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = fma(c, b, fma(k, Float64(j * -27.0), Float64(t * fma(x, Float64(18.0 * Float64(y * z)), Float64(-4.0 * a)))))
	tmp = 0.0
	if (t <= -9.2e+36)
		tmp = t_1;
	elseif (t <= 6.4e-48)
		tmp = fma(b, c, fma(-4.0, fma(a, t, Float64(x * i)), Float64(j * Float64(k * -27.0))));
	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[(k * N[(j * -27.0), $MachinePrecision] + N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.2e+36], t$95$1, If[LessEqual[t, 6.4e-48], N[(b * c + N[(-4.0 * N[(a * t + N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(c, b, \mathsf{fma}\left(k, j \cdot -27, t \cdot \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -4 \cdot a\right)\right)\right)\\
\mathbf{if}\;t \leq -9.2 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.19999999999999986e36 or 6.39999999999999959e-48 < t

    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 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. 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) - 4 \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\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) - 27 \cdot \left(j \cdot k\right) \]
      3. associate--l+N/A

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

        \[\leadsto \color{blue}{\left(\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)} - 27 \cdot \left(j \cdot k\right) \]
      5. associate--l+N/A

        \[\leadsto \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) + \left(b \cdot c - 27 \cdot \left(j \cdot k\right)\right)} \]
      6. *-commutativeN/A

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

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

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

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

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

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

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

    if -9.19999999999999986e36 < t < 6.39999999999999959e-48

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 55.4% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \cdot b \leq -100000000000:\\ \;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\right)\\ \mathbf{elif}\;c \cdot b \leq 5 \cdot 10^{-190}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot j, -27, -4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{elif}\;c \cdot b \leq 10^{+111}:\\ \;\;\;\;\mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(j \cdot -27, k, c \cdot b\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<= (* c b) -100000000000.0)
   (fma b c (* -4.0 (* t a)))
   (if (<= (* c b) 5e-190)
     (fma (* k j) -27.0 (* -4.0 (* x i)))
     (if (<= (* c b) 1e+111)
       (fma -4.0 (* t a) (* j (* k -27.0)))
       (fma (* j -27.0) k (* c b))))))
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 ((c * b) <= -100000000000.0) {
		tmp = fma(b, c, (-4.0 * (t * a)));
	} else if ((c * b) <= 5e-190) {
		tmp = fma((k * j), -27.0, (-4.0 * (x * i)));
	} else if ((c * b) <= 1e+111) {
		tmp = fma(-4.0, (t * a), (j * (k * -27.0)));
	} else {
		tmp = fma((j * -27.0), k, (c * b));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (Float64(c * b) <= -100000000000.0)
		tmp = fma(b, c, Float64(-4.0 * Float64(t * a)));
	elseif (Float64(c * b) <= 5e-190)
		tmp = fma(Float64(k * j), -27.0, Float64(-4.0 * Float64(x * i)));
	elseif (Float64(c * b) <= 1e+111)
		tmp = fma(-4.0, Float64(t * a), Float64(j * Float64(k * -27.0)));
	else
		tmp = fma(Float64(j * -27.0), k, Float64(c * b));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(c * b), $MachinePrecision], -100000000000.0], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * b), $MachinePrecision], 5e-190], N[(N[(k * j), $MachinePrecision] * -27.0 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * b), $MachinePrecision], 1e+111], N[(-4.0 * N[(t * a), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * -27.0), $MachinePrecision] * k + N[(c * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;c \cdot b \leq -100000000000:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\right)\\

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

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

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


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

    1. Initial program 73.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. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \color{blue}{\left(a \cdot t\right)}\right) \]
    8. Simplified63.2%

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

    if -1e11 < (*.f64 b c) < 5.00000000000000034e-190

    1. Initial program 88.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. Applied egg-rr86.5%

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

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

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

        \[\leadsto \mathsf{fma}\left(k \cdot j, -27, -4 \cdot \color{blue}{\left(i \cdot x\right)}\right) \]
    6. Simplified60.6%

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

    if 5.00000000000000034e-190 < (*.f64 b c) < 9.99999999999999957e110

    1. Initial program 87.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. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right) \]
      5. associate-*r*N/A

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

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

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

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

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

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

    if 9.99999999999999957e110 < (*.f64 b c)

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

      \[\leadsto \color{blue}{b \cdot c} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. lower-*.f6462.3

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

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

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

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

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

        \[\leadsto b \cdot c + \left(\mathsf{neg}\left(\color{blue}{j \cdot 27}\right)\right) \cdot k \]
      5. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto b \cdot c + j \cdot \color{blue}{\left(k \cdot -27\right)} \]
      9. lift-*.f64N/A

        \[\leadsto b \cdot c + j \cdot \color{blue}{\left(k \cdot -27\right)} \]
      10. lift-*.f64N/A

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

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right) + b \cdot c} \]
      12. lift-*.f64N/A

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right)} + b \cdot c \]
      13. lift-*.f64N/A

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

        \[\leadsto j \cdot \color{blue}{\left(-27 \cdot k\right)} + b \cdot c \]
      15. associate-*r*N/A

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

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{j \cdot -27}, k, b \cdot c\right) \]
    7. Applied egg-rr62.3%

      \[\leadsto \color{blue}{\mathsf{fma}\left(j \cdot -27, k, b \cdot c\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification62.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \cdot b \leq -100000000000:\\ \;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\right)\\ \mathbf{elif}\;c \cdot b \leq 5 \cdot 10^{-190}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot j, -27, -4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{elif}\;c \cdot b \leq 10^{+111}:\\ \;\;\;\;\mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(j \cdot -27, k, c \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 58.9% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{if}\;x \leq -3.15 \cdot 10^{+41}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{-105}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot j, -27, c \cdot b\right)\\ \mathbf{elif}\;x \leq 2.95 \cdot 10^{-207}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot j, -27, a \cdot \left(t \cdot -4\right)\right)\\ \mathbf{elif}\;x \leq 1.22 \cdot 10^{+25}:\\ \;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\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 (* x (fma -4.0 i (* t (* 18.0 (* y z)))))))
   (if (<= x -3.15e+41)
     t_1
     (if (<= x -7.5e-105)
       (fma (* k j) -27.0 (* c b))
       (if (<= x 2.95e-207)
         (fma (* k j) -27.0 (* a (* t -4.0)))
         (if (<= x 1.22e+25) (fma b c (* -4.0 (* t a))) 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 = x * fma(-4.0, i, (t * (18.0 * (y * z))));
	double tmp;
	if (x <= -3.15e+41) {
		tmp = t_1;
	} else if (x <= -7.5e-105) {
		tmp = fma((k * j), -27.0, (c * b));
	} else if (x <= 2.95e-207) {
		tmp = fma((k * j), -27.0, (a * (t * -4.0)));
	} else if (x <= 1.22e+25) {
		tmp = fma(b, c, (-4.0 * (t * a)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(x * fma(-4.0, i, Float64(t * Float64(18.0 * Float64(y * z)))))
	tmp = 0.0
	if (x <= -3.15e+41)
		tmp = t_1;
	elseif (x <= -7.5e-105)
		tmp = fma(Float64(k * j), -27.0, Float64(c * b));
	elseif (x <= 2.95e-207)
		tmp = fma(Float64(k * j), -27.0, Float64(a * Float64(t * -4.0)));
	elseif (x <= 1.22e+25)
		tmp = fma(b, c, Float64(-4.0 * Float64(t * a)));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(-4.0 * i + N[(t * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.15e+41], t$95$1, If[LessEqual[x, -7.5e-105], N[(N[(k * j), $MachinePrecision] * -27.0 + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.95e-207], N[(N[(k * j), $MachinePrecision] * -27.0 + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.22e+25], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;x \leq -3.15 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -7.5 \cdot 10^{-105}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot j, -27, c \cdot b\right)\\

\mathbf{elif}\;x \leq 2.95 \cdot 10^{-207}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot j, -27, a \cdot \left(t \cdot -4\right)\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -3.1499999999999999e41 or 1.22000000000000001e25 < x

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

        \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
      2. cancel-sign-sub-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)} \]
      3. metadata-evalN/A

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

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

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

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

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

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

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

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

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

    if -3.1499999999999999e41 < x < -7.5000000000000006e-105

    1. Initial program 89.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 b around inf

      \[\leadsto \color{blue}{b \cdot c} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. lower-*.f6464.9

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

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

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

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

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

        \[\leadsto b \cdot c + \left(\mathsf{neg}\left(\color{blue}{j \cdot 27}\right)\right) \cdot k \]
      5. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto b \cdot c + j \cdot \color{blue}{\left(k \cdot -27\right)} \]
      9. lift-*.f64N/A

        \[\leadsto b \cdot c + j \cdot \color{blue}{\left(k \cdot -27\right)} \]
      10. lift-*.f64N/A

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

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right) + b \cdot c} \]
      12. lift-*.f64N/A

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right)} + b \cdot c \]
      13. lift-*.f64N/A

        \[\leadsto j \cdot \color{blue}{\left(k \cdot -27\right)} + b \cdot c \]
      14. associate-*r*N/A

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

        \[\leadsto \color{blue}{\left(k \cdot j\right)} \cdot -27 + b \cdot c \]
      16. lift-*.f64N/A

        \[\leadsto \color{blue}{\left(k \cdot j\right)} \cdot -27 + b \cdot c \]
      17. lower-fma.f6465.1

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot j, -27, b \cdot c\right)} \]
    7. Applied egg-rr65.1%

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

    if -7.5000000000000006e-105 < x < 2.94999999999999986e-207

    1. Initial program 91.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. Applied egg-rr79.9%

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

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

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

        \[\leadsto \mathsf{fma}\left(k \cdot j, -27, \color{blue}{\left(a \cdot -4\right)} \cdot t\right) \]
      3. associate-*r*N/A

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

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

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

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

    if 2.94999999999999986e-207 < x < 1.22000000000000001e25

    1. Initial program 91.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 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. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \color{blue}{\left(a \cdot t\right)}\right) \]
    8. Simplified60.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.15 \cdot 10^{+41}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{-105}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot j, -27, c \cdot b\right)\\ \mathbf{elif}\;x \leq 2.95 \cdot 10^{-207}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot j, -27, a \cdot \left(t \cdot -4\right)\right)\\ \mathbf{elif}\;x \leq 1.22 \cdot 10^{+25}:\\ \;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 48.6% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\\ \mathbf{if}\;i \leq -5 \cdot 10^{-6}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;i \leq -7.4 \cdot 10^{-126}:\\ \;\;\;\;\mathsf{fma}\left(j \cdot -27, k, c \cdot b\right)\\ \mathbf{elif}\;i \leq -2.8 \cdot 10^{-219}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;i \leq 2.3 \cdot 10^{-172}:\\ \;\;\;\;\mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\\ \mathbf{elif}\;i \leq 3.5 \cdot 10^{+18}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot j, -27, c \cdot b\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 (* -4.0 (fma i x (* t a)))))
   (if (<= i -5e-6)
     t_1
     (if (<= i -7.4e-126)
       (fma (* j -27.0) k (* c b))
       (if (<= i -2.8e-219)
         (* x (* 18.0 (* t (* y z))))
         (if (<= i 2.3e-172)
           (fma -4.0 (* t a) (* j (* k -27.0)))
           (if (<= i 3.5e+18) (fma (* k j) -27.0 (* c b)) 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 = -4.0 * fma(i, x, (t * a));
	double tmp;
	if (i <= -5e-6) {
		tmp = t_1;
	} else if (i <= -7.4e-126) {
		tmp = fma((j * -27.0), k, (c * b));
	} else if (i <= -2.8e-219) {
		tmp = x * (18.0 * (t * (y * z)));
	} else if (i <= 2.3e-172) {
		tmp = fma(-4.0, (t * a), (j * (k * -27.0)));
	} else if (i <= 3.5e+18) {
		tmp = fma((k * j), -27.0, (c * b));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(-4.0 * fma(i, x, Float64(t * a)))
	tmp = 0.0
	if (i <= -5e-6)
		tmp = t_1;
	elseif (i <= -7.4e-126)
		tmp = fma(Float64(j * -27.0), k, Float64(c * b));
	elseif (i <= -2.8e-219)
		tmp = Float64(x * Float64(18.0 * Float64(t * Float64(y * z))));
	elseif (i <= 2.3e-172)
		tmp = fma(-4.0, Float64(t * a), Float64(j * Float64(k * -27.0)));
	elseif (i <= 3.5e+18)
		tmp = fma(Float64(k * j), -27.0, Float64(c * b));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(i * x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -5e-6], t$95$1, If[LessEqual[i, -7.4e-126], N[(N[(j * -27.0), $MachinePrecision] * k + N[(c * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, -2.8e-219], N[(x * N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2.3e-172], N[(-4.0 * N[(t * a), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 3.5e+18], N[(N[(k * j), $MachinePrecision] * -27.0 + N[(c * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := -4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\\
\mathbf{if}\;i \leq -5 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;i \leq -7.4 \cdot 10^{-126}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, c \cdot b\right)\\

\mathbf{elif}\;i \leq -2.8 \cdot 10^{-219}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\

\mathbf{elif}\;i \leq 2.3 \cdot 10^{-172}:\\
\;\;\;\;\mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\\

\mathbf{elif}\;i \leq 3.5 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{fma}\left(k \cdot j, -27, c \cdot b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if i < -5.00000000000000041e-6 or 3.5e18 < i

    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. Applied egg-rr84.9%

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

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

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

        \[\leadsto \mathsf{fma}\left(k \cdot j, -27, \mathsf{fma}\left(x, i \cdot -4, \color{blue}{\left(a \cdot -4\right)} \cdot t\right)\right) \]
      3. associate-*r*N/A

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

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + -4 \cdot \left(i \cdot x\right)} \]
    8. Step-by-step derivation
      1. distribute-lft-outN/A

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

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

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

        \[\leadsto -4 \cdot \color{blue}{\mathsf{fma}\left(i, x, a \cdot t\right)} \]
      5. lower-*.f6463.7

        \[\leadsto -4 \cdot \mathsf{fma}\left(i, x, \color{blue}{a \cdot t}\right) \]
    9. Simplified63.7%

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

    if -5.00000000000000041e-6 < i < -7.3999999999999998e-126

    1. Initial program 91.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 b around inf

      \[\leadsto \color{blue}{b \cdot c} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. lower-*.f6456.8

        \[\leadsto \color{blue}{b \cdot c} - \left(j \cdot 27\right) \cdot k \]
    5. Simplified56.8%

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

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

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

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

        \[\leadsto b \cdot c + \left(\mathsf{neg}\left(\color{blue}{j \cdot 27}\right)\right) \cdot k \]
      5. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto b \cdot c + j \cdot \color{blue}{\left(k \cdot -27\right)} \]
      9. lift-*.f64N/A

        \[\leadsto b \cdot c + j \cdot \color{blue}{\left(k \cdot -27\right)} \]
      10. lift-*.f64N/A

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

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right) + b \cdot c} \]
      12. lift-*.f64N/A

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right)} + b \cdot c \]
      13. lift-*.f64N/A

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

        \[\leadsto j \cdot \color{blue}{\left(-27 \cdot k\right)} + b \cdot c \]
      15. associate-*r*N/A

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(j \cdot -27, k, b \cdot c\right)} \]
      17. lower-*.f6456.8

        \[\leadsto \mathsf{fma}\left(\color{blue}{j \cdot -27}, k, b \cdot c\right) \]
    7. Applied egg-rr56.8%

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

    if -7.3999999999999998e-126 < i < -2.7999999999999999e-219

    1. Initial program 74.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. Applied egg-rr69.8%

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

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

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

        \[\leadsto 18 \cdot \color{blue}{\left(\left(t \cdot \left(y \cdot z\right)\right) \cdot x\right)} \]
      3. associate-*l*N/A

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

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

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

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

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(\left(t \cdot z\right) \cdot y\right)}\right) \]
      8. associate-*l*N/A

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

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

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

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

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

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

        \[\leadsto x \cdot \left(y \cdot \left(z \cdot \color{blue}{\left(t \cdot 18\right)}\right)\right) \]
      15. lower-*.f6448.7

        \[\leadsto x \cdot \left(y \cdot \left(z \cdot \color{blue}{\left(t \cdot 18\right)}\right)\right) \]
    6. Simplified48.7%

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

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

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

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

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

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

        \[\leadsto x \cdot \left(\color{blue}{\left(\left(y \cdot z\right) \cdot t\right)} \cdot 18\right) \]
      7. lower-*.f6454.2

        \[\leadsto x \cdot \left(\left(\color{blue}{\left(y \cdot z\right)} \cdot t\right) \cdot 18\right) \]
    8. Applied egg-rr54.2%

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

    if -2.7999999999999999e-219 < i < 2.29999999999999995e-172

    1. Initial program 83.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. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-4, a \cdot t, \color{blue}{\left(j \cdot k\right) \cdot -27}\right) \]
      5. associate-*r*N/A

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

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

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

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

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

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

    if 2.29999999999999995e-172 < i < 3.5e18

    1. Initial program 90.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 b around inf

      \[\leadsto \color{blue}{b \cdot c} - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. lower-*.f6458.0

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

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

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

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

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

        \[\leadsto b \cdot c + \left(\mathsf{neg}\left(\color{blue}{j \cdot 27}\right)\right) \cdot k \]
      5. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto b \cdot c + j \cdot \color{blue}{\left(k \cdot -27\right)} \]
      9. lift-*.f64N/A

        \[\leadsto b \cdot c + j \cdot \color{blue}{\left(k \cdot -27\right)} \]
      10. lift-*.f64N/A

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

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right) + b \cdot c} \]
      12. lift-*.f64N/A

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right)} + b \cdot c \]
      13. lift-*.f64N/A

        \[\leadsto j \cdot \color{blue}{\left(k \cdot -27\right)} + b \cdot c \]
      14. associate-*r*N/A

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

        \[\leadsto \color{blue}{\left(k \cdot j\right)} \cdot -27 + b \cdot c \]
      16. lift-*.f64N/A

        \[\leadsto \color{blue}{\left(k \cdot j\right)} \cdot -27 + b \cdot c \]
      17. lower-fma.f6458.0

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot j, -27, b \cdot c\right)} \]
    7. Applied egg-rr58.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot j, -27, b \cdot c\right)} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification62.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -5 \cdot 10^{-6}:\\ \;\;\;\;-4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\\ \mathbf{elif}\;i \leq -7.4 \cdot 10^{-126}:\\ \;\;\;\;\mathsf{fma}\left(j \cdot -27, k, c \cdot b\right)\\ \mathbf{elif}\;i \leq -2.8 \cdot 10^{-219}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;i \leq 2.3 \cdot 10^{-172}:\\ \;\;\;\;\mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\\ \mathbf{elif}\;i \leq 3.5 \cdot 10^{+18}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot j, -27, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 71.5% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\\ t_2 := x \cdot \mathsf{fma}\left(-4, i, t\_1\right)\\ \mathbf{if}\;x \leq -1.8 \cdot 10^{+164}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \leq -1.35 \cdot 10^{+112}:\\ \;\;\;\;\mathsf{fma}\left(c, b, x \cdot t\_1\right)\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{+25}:\\ \;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\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 (* t (* 18.0 (* y z)))) (t_2 (* x (fma -4.0 i t_1))))
   (if (<= x -1.8e+164)
     t_2
     (if (<= x -1.35e+112)
       (fma c b (* x t_1))
       (if (<= x 5.2e+25)
         (fma b c (fma -4.0 (* t a) (* j (* k -27.0))))
         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 = t * (18.0 * (y * z));
	double t_2 = x * fma(-4.0, i, t_1);
	double tmp;
	if (x <= -1.8e+164) {
		tmp = t_2;
	} else if (x <= -1.35e+112) {
		tmp = fma(c, b, (x * t_1));
	} else if (x <= 5.2e+25) {
		tmp = fma(b, c, fma(-4.0, (t * a), (j * (k * -27.0))));
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(t * Float64(18.0 * Float64(y * z)))
	t_2 = Float64(x * fma(-4.0, i, t_1))
	tmp = 0.0
	if (x <= -1.8e+164)
		tmp = t_2;
	elseif (x <= -1.35e+112)
		tmp = fma(c, b, Float64(x * t_1));
	elseif (x <= 5.2e+25)
		tmp = fma(b, c, fma(-4.0, Float64(t * a), Float64(j * Float64(k * -27.0))));
	else
		tmp = t_2;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(-4.0 * i + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.8e+164], t$95$2, If[LessEqual[x, -1.35e+112], N[(c * b + N[(x * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.2e+25], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\\
t_2 := x \cdot \mathsf{fma}\left(-4, i, t\_1\right)\\
\mathbf{if}\;x \leq -1.8 \cdot 10^{+164}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;x \leq -1.35 \cdot 10^{+112}:\\
\;\;\;\;\mathsf{fma}\left(c, b, x \cdot t\_1\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.79999999999999995e164 or 5.1999999999999997e25 < x

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

        \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
      2. cancel-sign-sub-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)} \]
      3. metadata-evalN/A

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

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

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

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

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

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

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

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

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

    if -1.79999999999999995e164 < x < -1.3500000000000001e112

    1. Initial program 74.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. 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) - 4 \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\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) - 27 \cdot \left(j \cdot k\right) \]
      3. associate--l+N/A

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

        \[\leadsto \color{blue}{\left(\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)} - 27 \cdot \left(j \cdot k\right) \]
      5. associate--l+N/A

        \[\leadsto \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) + \left(b \cdot c - 27 \cdot \left(j \cdot k\right)\right)} \]
      6. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(c, b, x \cdot \left(t \cdot \color{blue}{\left(18 \cdot \left(y \cdot z\right)\right)}\right)\right) \]
      11. lower-*.f6482.1

        \[\leadsto \mathsf{fma}\left(c, b, x \cdot \left(t \cdot \left(18 \cdot \color{blue}{\left(y \cdot z\right)}\right)\right)\right) \]
    9. Simplified82.1%

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

    if -1.3500000000000001e112 < x < 5.1999999999999997e25

    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. 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. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.8 \cdot 10^{+164}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;x \leq -1.35 \cdot 10^{+112}:\\ \;\;\;\;\mathsf{fma}\left(c, b, x \cdot \left(t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\right)\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{+25}:\\ \;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 76.4% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(t, \mathsf{fma}\left(-4, a, x \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right), c \cdot b\right)\\ \mathbf{if}\;t \leq -3.3 \cdot 10^{-28}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-10}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot j, -27, \mathsf{fma}\left(x, -4 \cdot i, c \cdot b\right)\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 t (fma -4.0 a (* x (* 18.0 (* y z)))) (* c b))))
   (if (<= t -3.3e-28)
     t_1
     (if (<= t 3.2e-10) (fma (* k j) -27.0 (fma x (* -4.0 i) (* c b))) 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(t, fma(-4.0, a, (x * (18.0 * (y * z)))), (c * b));
	double tmp;
	if (t <= -3.3e-28) {
		tmp = t_1;
	} else if (t <= 3.2e-10) {
		tmp = fma((k * j), -27.0, fma(x, (-4.0 * i), (c * b)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = fma(t, fma(-4.0, a, Float64(x * Float64(18.0 * Float64(y * z)))), Float64(c * b))
	tmp = 0.0
	if (t <= -3.3e-28)
		tmp = t_1;
	elseif (t <= 3.2e-10)
		tmp = fma(Float64(k * j), -27.0, fma(x, Float64(-4.0 * i), Float64(c * b)));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(-4.0 * a + N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.3e-28], t$95$1, If[LessEqual[t, 3.2e-10], N[(N[(k * j), $MachinePrecision] * -27.0 + N[(x * N[(-4.0 * i), $MachinePrecision] + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t, \mathsf{fma}\left(-4, a, x \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right), c \cdot b\right)\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.3000000000000002e-28 or 3.19999999999999981e-10 < t

    1. Initial program 79.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 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. 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) - 4 \cdot \left(a \cdot t\right)\right) - 27 \cdot \left(j \cdot k\right)} \]
      2. +-commutativeN/A

        \[\leadsto \left(\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) - 27 \cdot \left(j \cdot k\right) \]
      3. associate--l+N/A

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

        \[\leadsto \color{blue}{\left(\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)} - 27 \cdot \left(j \cdot k\right) \]
      5. associate--l+N/A

        \[\leadsto \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) + \left(b \cdot c - 27 \cdot \left(j \cdot k\right)\right)} \]
      6. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.3000000000000002e-28 < t < 3.19999999999999981e-10

    1. Initial program 87.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. Applied egg-rr81.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.3 \cdot 10^{-28}:\\ \;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(-4, a, x \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right), c \cdot b\right)\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-10}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot j, -27, \mathsf{fma}\left(x, -4 \cdot i, c \cdot b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(-4, a, x \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right), c \cdot b\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 35.8% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \cdot b \leq -1.1 \cdot 10^{+93}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;c \cdot b \leq 3.5 \cdot 10^{-190}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;c \cdot b \leq 1.75 \cdot 10^{+115}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<= (* c b) -1.1e+93)
   (* c b)
   (if (<= (* c b) 3.5e-190)
     (* -4.0 (* x i))
     (if (<= (* c b) 1.75e+115) (* -4.0 (* t a)) (* c b)))))
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 ((c * b) <= -1.1e+93) {
		tmp = c * b;
	} else if ((c * b) <= 3.5e-190) {
		tmp = -4.0 * (x * i);
	} else if ((c * b) <= 1.75e+115) {
		tmp = -4.0 * (t * a);
	} else {
		tmp = c * b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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) :: tmp
    if ((c * b) <= (-1.1d+93)) then
        tmp = c * b
    else if ((c * b) <= 3.5d-190) then
        tmp = (-4.0d0) * (x * i)
    else if ((c * b) <= 1.75d+115) then
        tmp = (-4.0d0) * (t * a)
    else
        tmp = c * b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if ((c * b) <= -1.1e+93) {
		tmp = c * b;
	} else if ((c * b) <= 3.5e-190) {
		tmp = -4.0 * (x * i);
	} else if ((c * b) <= 1.75e+115) {
		tmp = -4.0 * (t * a);
	} else {
		tmp = c * b;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (c * b) <= -1.1e+93:
		tmp = c * b
	elif (c * b) <= 3.5e-190:
		tmp = -4.0 * (x * i)
	elif (c * b) <= 1.75e+115:
		tmp = -4.0 * (t * a)
	else:
		tmp = c * b
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (Float64(c * b) <= -1.1e+93)
		tmp = Float64(c * b);
	elseif (Float64(c * b) <= 3.5e-190)
		tmp = Float64(-4.0 * Float64(x * i));
	elseif (Float64(c * b) <= 1.75e+115)
		tmp = Float64(-4.0 * Float64(t * a));
	else
		tmp = Float64(c * b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((c * b) <= -1.1e+93)
		tmp = c * b;
	elseif ((c * b) <= 3.5e-190)
		tmp = -4.0 * (x * i);
	elseif ((c * b) <= 1.75e+115)
		tmp = -4.0 * (t * a);
	else
		tmp = c * b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(c * b), $MachinePrecision], -1.1e+93], N[(c * b), $MachinePrecision], If[LessEqual[N[(c * b), $MachinePrecision], 3.5e-190], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(c * b), $MachinePrecision], 1.75e+115], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], N[(c * b), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;c \cdot b \leq -1.1 \cdot 10^{+93}:\\
\;\;\;\;c \cdot b\\

\mathbf{elif}\;c \cdot b \leq 3.5 \cdot 10^{-190}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\

\mathbf{elif}\;c \cdot b \leq 1.75 \cdot 10^{+115}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\

\mathbf{else}:\\
\;\;\;\;c \cdot b\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -1.10000000000000011e93 or 1.75000000000000003e115 < (*.f64 b c)

    1. Initial program 75.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 b around inf

      \[\leadsto \color{blue}{b \cdot c} \]
    4. Step-by-step derivation
      1. lower-*.f6448.2

        \[\leadsto \color{blue}{b \cdot c} \]
    5. Simplified48.2%

      \[\leadsto \color{blue}{b \cdot c} \]

    if -1.10000000000000011e93 < (*.f64 b c) < 3.4999999999999999e-190

    1. Initial program 86.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 i around inf

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

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

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

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

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

    if 3.4999999999999999e-190 < (*.f64 b c) < 1.75000000000000003e115

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

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

        \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
      2. lower-*.f6440.8

        \[\leadsto -4 \cdot \color{blue}{\left(a \cdot t\right)} \]
    5. Simplified40.8%

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification39.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \cdot b \leq -1.1 \cdot 10^{+93}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;c \cdot b \leq 3.5 \cdot 10^{-190}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;c \cdot b \leq 1.75 \cdot 10^{+115}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 52.0% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
t_1 := -4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\\
\mathbf{if}\;a \cdot 4 \leq -2 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a #s(literal 4 binary64)) < -1.9999999999999998e131 or 5.00000000000000022e47 < (*.f64 a #s(literal 4 binary64))

    1. Initial program 73.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. Applied egg-rr85.3%

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

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

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

        \[\leadsto \mathsf{fma}\left(k \cdot j, -27, \mathsf{fma}\left(x, i \cdot -4, \color{blue}{\left(a \cdot -4\right)} \cdot t\right)\right) \]
      3. associate-*r*N/A

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

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + -4 \cdot \left(i \cdot x\right)} \]
    8. Step-by-step derivation
      1. distribute-lft-outN/A

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

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

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

        \[\leadsto -4 \cdot \color{blue}{\mathsf{fma}\left(i, x, a \cdot t\right)} \]
      5. lower-*.f6460.5

        \[\leadsto -4 \cdot \mathsf{fma}\left(i, x, \color{blue}{a \cdot t}\right) \]
    9. Simplified60.5%

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

    if -1.9999999999999998e131 < (*.f64 a #s(literal 4 binary64)) < 5.00000000000000022e47

    1. Initial program 89.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 b around inf

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

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

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

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

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

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

        \[\leadsto b \cdot c + \left(\mathsf{neg}\left(\color{blue}{j \cdot 27}\right)\right) \cdot k \]
      5. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto b \cdot c + j \cdot \color{blue}{\left(k \cdot -27\right)} \]
      9. lift-*.f64N/A

        \[\leadsto b \cdot c + j \cdot \color{blue}{\left(k \cdot -27\right)} \]
      10. lift-*.f64N/A

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

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right) + b \cdot c} \]
      12. lift-*.f64N/A

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right)} + b \cdot c \]
      13. lift-*.f64N/A

        \[\leadsto j \cdot \color{blue}{\left(k \cdot -27\right)} + b \cdot c \]
      14. associate-*r*N/A

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

        \[\leadsto \color{blue}{\left(k \cdot j\right)} \cdot -27 + b \cdot c \]
      16. lift-*.f64N/A

        \[\leadsto \color{blue}{\left(k \cdot j\right)} \cdot -27 + b \cdot c \]
      17. lower-fma.f6453.2

        \[\leadsto \color{blue}{\mathsf{fma}\left(k \cdot j, -27, b \cdot c\right)} \]
    7. Applied egg-rr53.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 4 \leq -2 \cdot 10^{+131}:\\ \;\;\;\;-4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\\ \mathbf{elif}\;a \cdot 4 \leq 5 \cdot 10^{+47}:\\ \;\;\;\;\mathsf{fma}\left(k \cdot j, -27, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 52.2% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
t_1 := -4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\\
\mathbf{if}\;a \cdot 4 \leq -2 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a #s(literal 4 binary64)) < -1.9999999999999998e131 or 5.00000000000000022e47 < (*.f64 a #s(literal 4 binary64))

    1. Initial program 73.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. Applied egg-rr85.3%

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

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

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

        \[\leadsto \mathsf{fma}\left(k \cdot j, -27, \mathsf{fma}\left(x, i \cdot -4, \color{blue}{\left(a \cdot -4\right)} \cdot t\right)\right) \]
      3. associate-*r*N/A

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

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + -4 \cdot \left(i \cdot x\right)} \]
    8. Step-by-step derivation
      1. distribute-lft-outN/A

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

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

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

        \[\leadsto -4 \cdot \color{blue}{\mathsf{fma}\left(i, x, a \cdot t\right)} \]
      5. lower-*.f6460.5

        \[\leadsto -4 \cdot \mathsf{fma}\left(i, x, \color{blue}{a \cdot t}\right) \]
    9. Simplified60.5%

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

    if -1.9999999999999998e131 < (*.f64 a #s(literal 4 binary64)) < 5.00000000000000022e47

    1. Initial program 89.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 b around inf

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

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

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

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

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

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

        \[\leadsto b \cdot c + \left(\mathsf{neg}\left(\color{blue}{j \cdot 27}\right)\right) \cdot k \]
      5. distribute-rgt-neg-inN/A

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

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

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

        \[\leadsto b \cdot c + j \cdot \color{blue}{\left(k \cdot -27\right)} \]
      9. lift-*.f64N/A

        \[\leadsto b \cdot c + j \cdot \color{blue}{\left(k \cdot -27\right)} \]
      10. lift-*.f64N/A

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

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right) + b \cdot c} \]
      12. lift-*.f64N/A

        \[\leadsto \color{blue}{j \cdot \left(k \cdot -27\right)} + b \cdot c \]
      13. lift-*.f64N/A

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

        \[\leadsto j \cdot \color{blue}{\left(-27 \cdot k\right)} + b \cdot c \]
      15. associate-*r*N/A

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(j \cdot -27, k, b \cdot c\right)} \]
      17. lower-*.f6453.1

        \[\leadsto \mathsf{fma}\left(\color{blue}{j \cdot -27}, k, b \cdot c\right) \]
    7. Applied egg-rr53.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 4 \leq -2 \cdot 10^{+131}:\\ \;\;\;\;-4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\\ \mathbf{elif}\;a \cdot 4 \leq 5 \cdot 10^{+47}:\\ \;\;\;\;\mathsf{fma}\left(j \cdot -27, k, c \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 53.8% accurate, 1.7× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -4.99999999999999999e97 or 1.9999999999999999e105 < (*.f64 b c)

    1. Initial program 75.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. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(b, c, -4 \cdot \color{blue}{\left(a \cdot t\right)}\right) \]
    8. Simplified64.7%

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

    if -4.99999999999999999e97 < (*.f64 b c) < 1.9999999999999999e105

    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. Applied egg-rr87.7%

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

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

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

        \[\leadsto \mathsf{fma}\left(k \cdot j, -27, \mathsf{fma}\left(x, i \cdot -4, \color{blue}{\left(a \cdot -4\right)} \cdot t\right)\right) \]
      3. associate-*r*N/A

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

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + -4 \cdot \left(i \cdot x\right)} \]
    8. Step-by-step derivation
      1. distribute-lft-outN/A

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

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

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

        \[\leadsto -4 \cdot \color{blue}{\mathsf{fma}\left(i, x, a \cdot t\right)} \]
      5. lower-*.f6450.4

        \[\leadsto -4 \cdot \mathsf{fma}\left(i, x, \color{blue}{a \cdot t}\right) \]
    9. Simplified50.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \cdot b \leq -5 \cdot 10^{+97}:\\ \;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\right)\\ \mathbf{elif}\;c \cdot b \leq 2 \cdot 10^{+105}:\\ \;\;\;\;-4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 50.1% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \cdot b \leq -6 \cdot 10^{+249}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;c \cdot b \leq 1.16 \cdot 10^{+232}:\\ \;\;\;\;-4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot b\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (<= (* c b) -6e+249)
   (* c b)
   (if (<= (* c b) 1.16e+232) (* -4.0 (fma i x (* t a))) (* c b))))
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 ((c * b) <= -6e+249) {
		tmp = c * b;
	} else if ((c * b) <= 1.16e+232) {
		tmp = -4.0 * fma(i, x, (t * a));
	} else {
		tmp = c * b;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if (Float64(c * b) <= -6e+249)
		tmp = Float64(c * b);
	elseif (Float64(c * b) <= 1.16e+232)
		tmp = Float64(-4.0 * fma(i, x, Float64(t * a)));
	else
		tmp = Float64(c * b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(c * b), $MachinePrecision], -6e+249], N[(c * b), $MachinePrecision], If[LessEqual[N[(c * b), $MachinePrecision], 1.16e+232], N[(-4.0 * N[(i * x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * b), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;c \cdot b \leq -6 \cdot 10^{+249}:\\
\;\;\;\;c \cdot b\\

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

\mathbf{else}:\\
\;\;\;\;c \cdot b\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -6.00000000000000032e249 or 1.16e232 < (*.f64 b c)

    1. Initial program 66.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 b around inf

      \[\leadsto \color{blue}{b \cdot c} \]
    4. Step-by-step derivation
      1. lower-*.f6469.2

        \[\leadsto \color{blue}{b \cdot c} \]
    5. Simplified69.2%

      \[\leadsto \color{blue}{b \cdot c} \]

    if -6.00000000000000032e249 < (*.f64 b c) < 1.16e232

    1. Initial program 86.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. Applied egg-rr88.8%

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

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

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

        \[\leadsto \mathsf{fma}\left(k \cdot j, -27, \mathsf{fma}\left(x, i \cdot -4, \color{blue}{\left(a \cdot -4\right)} \cdot t\right)\right) \]
      3. associate-*r*N/A

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

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + -4 \cdot \left(i \cdot x\right)} \]
    8. Step-by-step derivation
      1. distribute-lft-outN/A

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

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

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

        \[\leadsto -4 \cdot \color{blue}{\mathsf{fma}\left(i, x, a \cdot t\right)} \]
      5. lower-*.f6448.5

        \[\leadsto -4 \cdot \mathsf{fma}\left(i, x, \color{blue}{a \cdot t}\right) \]
    9. Simplified48.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \cdot b \leq -6 \cdot 10^{+249}:\\ \;\;\;\;c \cdot b\\ \mathbf{elif}\;c \cdot b \leq 1.16 \cdot 10^{+232}:\\ \;\;\;\;-4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot b\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 32.8% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;a \cdot 4 \leq -4 \cdot 10^{+80}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \cdot 4 \leq 10^{+16}:\\ \;\;\;\;c \cdot b\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* -4.0 (* t a))))
   (if (<= (* a 4.0) -4e+80) t_1 (if (<= (* a 4.0) 1e+16) (* c b) 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 = -4.0 * (t * a);
	double tmp;
	if ((a * 4.0) <= -4e+80) {
		tmp = t_1;
	} else if ((a * 4.0) <= 1e+16) {
		tmp = c * b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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 = (-4.0d0) * (t * a)
    if ((a * 4.0d0) <= (-4d+80)) then
        tmp = t_1
    else if ((a * 4.0d0) <= 1d+16) then
        tmp = c * b
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = -4.0 * (t * a);
	double tmp;
	if ((a * 4.0) <= -4e+80) {
		tmp = t_1;
	} else if ((a * 4.0) <= 1e+16) {
		tmp = c * b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = -4.0 * (t * a)
	tmp = 0
	if (a * 4.0) <= -4e+80:
		tmp = t_1
	elif (a * 4.0) <= 1e+16:
		tmp = c * b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(-4.0 * Float64(t * a))
	tmp = 0.0
	if (Float64(a * 4.0) <= -4e+80)
		tmp = t_1;
	elseif (Float64(a * 4.0) <= 1e+16)
		tmp = Float64(c * b);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = -4.0 * (t * a);
	tmp = 0.0;
	if ((a * 4.0) <= -4e+80)
		tmp = t_1;
	elseif ((a * 4.0) <= 1e+16)
		tmp = c * b;
	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[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 4.0), $MachinePrecision], -4e+80], t$95$1, If[LessEqual[N[(a * 4.0), $MachinePrecision], 1e+16], N[(c * b), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

\mathbf{elif}\;a \cdot 4 \leq 10^{+16}:\\
\;\;\;\;c \cdot b\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 a #s(literal 4 binary64)) < -4e80 or 1e16 < (*.f64 a #s(literal 4 binary64))

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

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

        \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
      2. lower-*.f6442.9

        \[\leadsto -4 \cdot \color{blue}{\left(a \cdot t\right)} \]
    5. Simplified42.9%

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

    if -4e80 < (*.f64 a #s(literal 4 binary64)) < 1e16

    1. Initial program 90.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 b around inf

      \[\leadsto \color{blue}{b \cdot c} \]
    4. Step-by-step derivation
      1. lower-*.f6431.8

        \[\leadsto \color{blue}{b \cdot c} \]
    5. Simplified31.8%

      \[\leadsto \color{blue}{b \cdot c} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification37.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \cdot 4 \leq -4 \cdot 10^{+80}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;a \cdot 4 \leq 10^{+16}:\\ \;\;\;\;c \cdot b\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 24.2% accurate, 11.3× speedup?

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

\\
c \cdot b
\end{array}
Derivation
  1. Initial program 82.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 b around inf

    \[\leadsto \color{blue}{b \cdot c} \]
  4. Step-by-step derivation
    1. lower-*.f6422.1

      \[\leadsto \color{blue}{b \cdot c} \]
  5. Simplified22.1%

    \[\leadsto \color{blue}{b \cdot c} \]
  6. Final simplification22.1%

    \[\leadsto c \cdot b \]
  7. Add Preprocessing

Developer Target 1: 89.2% 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;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    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 2024207 
(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)))