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

Percentage Accurate: 85.8% → 91.3%
Time: 28.4s
Alternatives: 18
Speedup: 0.5×

Specification

?
\[\begin{array}{l} \\ \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (-
  (-
   (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c))
   (* (* x 4.0) i))
  (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
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 18 alternatives:

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

Initial Program: 85.8% 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.3% accurate, 0.1× speedup?

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

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

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


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

    1. Initial program 95.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. Simplified95.5%

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

    if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) 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. Simplified22.7%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 59.3%

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    5. Step-by-step derivation
      1. expm1-log1p-u41.1%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-udef41.1%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)} - 1\right)} - 4 \cdot i\right) \]
    6. Applied egg-rr41.1%

      \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)} - 1\right)} - 4 \cdot i\right) \]
    7. Step-by-step derivation
      1. expm1-def41.1%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-log1p59.3%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(t \cdot \left(y \cdot z\right)\right)} - 4 \cdot i\right) \]
      3. *-commutative59.3%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\right)} - 4 \cdot i\right) \]
      4. associate-*l*63.8%

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

      \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(y \cdot \left(z \cdot t\right)\right)} - 4 \cdot i\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification92.8%

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

Alternative 2: 91.3% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 95.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. Simplified95.5%

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

    if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) 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. Simplified22.7%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 59.3%

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    5. Step-by-step derivation
      1. expm1-log1p-u41.1%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-udef41.1%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)} - 1\right)} - 4 \cdot i\right) \]
    6. Applied egg-rr41.1%

      \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)} - 1\right)} - 4 \cdot i\right) \]
    7. Step-by-step derivation
      1. expm1-def41.1%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-log1p59.3%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(t \cdot \left(y \cdot z\right)\right)} - 4 \cdot i\right) \]
      3. *-commutative59.3%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\right)} - 4 \cdot i\right) \]
      4. associate-*l*63.8%

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

      \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(y \cdot \left(z \cdot t\right)\right)} - 4 \cdot i\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification92.8%

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

Alternative 3: 33.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := -27 \cdot \left(j \cdot k\right)\\ t_2 := -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -8.2 \cdot 10^{-53}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \cdot c \leq -7.2 \cdot 10^{-144}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-324}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{-117}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \cdot c \leq 1.02 \cdot 10^{-80}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \cdot c \leq 9 \cdot 10^{+130}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* -27.0 (* j k))) (t_2 (* -4.0 (* t a))))
   (if (<= (* b c) -1.95e+305)
     (* b c)
     (if (<= (* b c) -8.2e-53)
       t_1
       (if (<= (* b c) -7.2e-144)
         t_2
         (if (<= (* b c) -5e-324)
           t_1
           (if (<= (* b c) 3e-117)
             t_2
             (if (<= (* b c) 1.02e-80)
               t_1
               (if (<= (* b c) 9e+130) t_2 (* b c))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = -27.0 * (j * k);
	double t_2 = -4.0 * (t * a);
	double tmp;
	if ((b * c) <= -1.95e+305) {
		tmp = b * c;
	} else if ((b * c) <= -8.2e-53) {
		tmp = t_1;
	} else if ((b * c) <= -7.2e-144) {
		tmp = t_2;
	} else if ((b * c) <= -5e-324) {
		tmp = t_1;
	} else if ((b * c) <= 3e-117) {
		tmp = t_2;
	} else if ((b * c) <= 1.02e-80) {
		tmp = t_1;
	} else if ((b * c) <= 9e+130) {
		tmp = t_2;
	} else {
		tmp = b * c;
	}
	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) * (j * k)
    t_2 = (-4.0d0) * (t * a)
    if ((b * c) <= (-1.95d+305)) then
        tmp = b * c
    else if ((b * c) <= (-8.2d-53)) then
        tmp = t_1
    else if ((b * c) <= (-7.2d-144)) then
        tmp = t_2
    else if ((b * c) <= (-5d-324)) then
        tmp = t_1
    else if ((b * c) <= 3d-117) then
        tmp = t_2
    else if ((b * c) <= 1.02d-80) then
        tmp = t_1
    else if ((b * c) <= 9d+130) then
        tmp = t_2
    else
        tmp = b * c
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = -27.0 * (j * k);
	double t_2 = -4.0 * (t * a);
	double tmp;
	if ((b * c) <= -1.95e+305) {
		tmp = b * c;
	} else if ((b * c) <= -8.2e-53) {
		tmp = t_1;
	} else if ((b * c) <= -7.2e-144) {
		tmp = t_2;
	} else if ((b * c) <= -5e-324) {
		tmp = t_1;
	} else if ((b * c) <= 3e-117) {
		tmp = t_2;
	} else if ((b * c) <= 1.02e-80) {
		tmp = t_1;
	} else if ((b * c) <= 9e+130) {
		tmp = t_2;
	} else {
		tmp = b * c;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = -27.0 * (j * k)
	t_2 = -4.0 * (t * a)
	tmp = 0
	if (b * c) <= -1.95e+305:
		tmp = b * c
	elif (b * c) <= -8.2e-53:
		tmp = t_1
	elif (b * c) <= -7.2e-144:
		tmp = t_2
	elif (b * c) <= -5e-324:
		tmp = t_1
	elif (b * c) <= 3e-117:
		tmp = t_2
	elif (b * c) <= 1.02e-80:
		tmp = t_1
	elif (b * c) <= 9e+130:
		tmp = t_2
	else:
		tmp = b * c
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(-27.0 * Float64(j * k))
	t_2 = Float64(-4.0 * Float64(t * a))
	tmp = 0.0
	if (Float64(b * c) <= -1.95e+305)
		tmp = Float64(b * c);
	elseif (Float64(b * c) <= -8.2e-53)
		tmp = t_1;
	elseif (Float64(b * c) <= -7.2e-144)
		tmp = t_2;
	elseif (Float64(b * c) <= -5e-324)
		tmp = t_1;
	elseif (Float64(b * c) <= 3e-117)
		tmp = t_2;
	elseif (Float64(b * c) <= 1.02e-80)
		tmp = t_1;
	elseif (Float64(b * c) <= 9e+130)
		tmp = t_2;
	else
		tmp = Float64(b * c);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = -27.0 * (j * k);
	t_2 = -4.0 * (t * a);
	tmp = 0.0;
	if ((b * c) <= -1.95e+305)
		tmp = b * c;
	elseif ((b * c) <= -8.2e-53)
		tmp = t_1;
	elseif ((b * c) <= -7.2e-144)
		tmp = t_2;
	elseif ((b * c) <= -5e-324)
		tmp = t_1;
	elseif ((b * c) <= 3e-117)
		tmp = t_2;
	elseif ((b * c) <= 1.02e-80)
		tmp = t_1;
	elseif ((b * c) <= 9e+130)
		tmp = t_2;
	else
		tmp = b * c;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.95e+305], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -8.2e-53], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -7.2e-144], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -5e-324], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 3e-117], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.02e-80], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 9e+130], t$95$2, N[(b * c), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
t_2 := -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305}:\\
\;\;\;\;b \cdot c\\

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

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

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

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

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

\mathbf{elif}\;b \cdot c \leq 9 \cdot 10^{+130}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -1.95e305 or 9.00000000000000078e130 < (*.f64 b c)

    1. Initial program 81.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. Simplified86.6%

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

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

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

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

    if -1.95e305 < (*.f64 b c) < -8.2000000000000001e-53 or -7.2000000000000001e-144 < (*.f64 b c) < -4.94066e-324 or 2.99999999999999991e-117 < (*.f64 b c) < 1.02000000000000005e-80

    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. Simplified92.8%

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

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

    if -8.2000000000000001e-53 < (*.f64 b c) < -7.2000000000000001e-144 or -4.94066e-324 < (*.f64 b c) < 2.99999999999999991e-117 or 1.02000000000000005e-80 < (*.f64 b c) < 9.00000000000000078e130

    1. Initial program 87.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. Simplified90.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -8.2 \cdot 10^{-53}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \cdot c \leq -7.2 \cdot 10^{-144}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-324}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{-117}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 1.02 \cdot 10^{-80}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \cdot c \leq 9 \cdot 10^{+130}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 33.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.05 \cdot 10^{-55}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \cdot c \leq -7.2 \cdot 10^{-144}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-324}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \cdot c \leq 1.35 \cdot 10^{-111}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \cdot c \leq 3.6 \cdot 10^{-78}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \cdot c \leq 3.5 \cdot 10^{+127}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \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 (* -4.0 (* t a))))
   (if (<= (* b c) -1.95e+305)
     (* b c)
     (if (<= (* b c) -1.05e-55)
       t_1
       (if (<= (* b c) -7.2e-144)
         t_2
         (if (<= (* b c) -5e-324)
           t_1
           (if (<= (* b c) 1.35e-111)
             t_2
             (if (<= (* b c) 3.6e-78)
               (* -27.0 (* j k))
               (if (<= (* b c) 3.5e+127) t_2 (* b c))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double t_2 = -4.0 * (t * a);
	double tmp;
	if ((b * c) <= -1.95e+305) {
		tmp = b * c;
	} else if ((b * c) <= -1.05e-55) {
		tmp = t_1;
	} else if ((b * c) <= -7.2e-144) {
		tmp = t_2;
	} else if ((b * c) <= -5e-324) {
		tmp = t_1;
	} else if ((b * c) <= 1.35e-111) {
		tmp = t_2;
	} else if ((b * c) <= 3.6e-78) {
		tmp = -27.0 * (j * k);
	} else if ((b * c) <= 3.5e+127) {
		tmp = t_2;
	} else {
		tmp = b * c;
	}
	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 = (-4.0d0) * (t * a)
    if ((b * c) <= (-1.95d+305)) then
        tmp = b * c
    else if ((b * c) <= (-1.05d-55)) then
        tmp = t_1
    else if ((b * c) <= (-7.2d-144)) then
        tmp = t_2
    else if ((b * c) <= (-5d-324)) then
        tmp = t_1
    else if ((b * c) <= 1.35d-111) then
        tmp = t_2
    else if ((b * c) <= 3.6d-78) then
        tmp = (-27.0d0) * (j * k)
    else if ((b * c) <= 3.5d+127) then
        tmp = t_2
    else
        tmp = b * c
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double t_2 = -4.0 * (t * a);
	double tmp;
	if ((b * c) <= -1.95e+305) {
		tmp = b * c;
	} else if ((b * c) <= -1.05e-55) {
		tmp = t_1;
	} else if ((b * c) <= -7.2e-144) {
		tmp = t_2;
	} else if ((b * c) <= -5e-324) {
		tmp = t_1;
	} else if ((b * c) <= 1.35e-111) {
		tmp = t_2;
	} else if ((b * c) <= 3.6e-78) {
		tmp = -27.0 * (j * k);
	} else if ((b * c) <= 3.5e+127) {
		tmp = t_2;
	} else {
		tmp = b * c;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = -4.0 * (t * a)
	tmp = 0
	if (b * c) <= -1.95e+305:
		tmp = b * c
	elif (b * c) <= -1.05e-55:
		tmp = t_1
	elif (b * c) <= -7.2e-144:
		tmp = t_2
	elif (b * c) <= -5e-324:
		tmp = t_1
	elif (b * c) <= 1.35e-111:
		tmp = t_2
	elif (b * c) <= 3.6e-78:
		tmp = -27.0 * (j * k)
	elif (b * c) <= 3.5e+127:
		tmp = t_2
	else:
		tmp = b * c
	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(-4.0 * Float64(t * a))
	tmp = 0.0
	if (Float64(b * c) <= -1.95e+305)
		tmp = Float64(b * c);
	elseif (Float64(b * c) <= -1.05e-55)
		tmp = t_1;
	elseif (Float64(b * c) <= -7.2e-144)
		tmp = t_2;
	elseif (Float64(b * c) <= -5e-324)
		tmp = t_1;
	elseif (Float64(b * c) <= 1.35e-111)
		tmp = t_2;
	elseif (Float64(b * c) <= 3.6e-78)
		tmp = Float64(-27.0 * Float64(j * k));
	elseif (Float64(b * c) <= 3.5e+127)
		tmp = t_2;
	else
		tmp = Float64(b * c);
	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 = -4.0 * (t * a);
	tmp = 0.0;
	if ((b * c) <= -1.95e+305)
		tmp = b * c;
	elseif ((b * c) <= -1.05e-55)
		tmp = t_1;
	elseif ((b * c) <= -7.2e-144)
		tmp = t_2;
	elseif ((b * c) <= -5e-324)
		tmp = t_1;
	elseif ((b * c) <= 1.35e-111)
		tmp = t_2;
	elseif ((b * c) <= 3.6e-78)
		tmp = -27.0 * (j * k);
	elseif ((b * c) <= 3.5e+127)
		tmp = t_2;
	else
		tmp = b * c;
	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[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.95e+305], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.05e-55], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -7.2e-144], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -5e-324], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.35e-111], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 3.6e-78], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.5e+127], t$95$2, N[(b * c), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305}:\\
\;\;\;\;b \cdot c\\

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

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

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

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

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

\mathbf{elif}\;b \cdot c \leq 3.5 \cdot 10^{+127}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 b c) < -1.95e305 or 3.49999999999999978e127 < (*.f64 b c)

    1. Initial program 81.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. Simplified86.6%

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

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

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

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

    if -1.95e305 < (*.f64 b c) < -1.0500000000000001e-55 or -7.2000000000000001e-144 < (*.f64 b c) < -4.94066e-324

    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. Simplified93.1%

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

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    7. Step-by-step derivation
      1. associate-*r*40.5%

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

        \[\leadsto \color{blue}{\left(j \cdot -27\right)} \cdot k \]
      3. associate-*r*40.6%

        \[\leadsto \color{blue}{j \cdot \left(-27 \cdot k\right)} \]
    8. Simplified40.6%

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

    if -1.0500000000000001e-55 < (*.f64 b c) < -7.2000000000000001e-144 or -4.94066e-324 < (*.f64 b c) < 1.34999999999999994e-111 or 3.6000000000000002e-78 < (*.f64 b c) < 3.49999999999999978e127

    1. Initial program 87.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. Simplified90.7%

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

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

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

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

    if 1.34999999999999994e-111 < (*.f64 b c) < 3.6000000000000002e-78

    1. Initial program 90.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. Simplified91.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.05 \cdot 10^{-55}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -7.2 \cdot 10^{-144}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-324}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq 1.35 \cdot 10^{-111}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 3.6 \cdot 10^{-78}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;b \cdot c \leq 3.5 \cdot 10^{+127}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 33.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := k \cdot \left(j \cdot -27\right)\\ t_2 := -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.1 \cdot 10^{-48}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -3.3 \cdot 10^{-143}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-324}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \cdot c \leq 9.6 \cdot 10^{-113}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \cdot c \leq 8.2 \cdot 10^{-81}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \cdot c \leq 1.6 \cdot 10^{+125}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* k (* j -27.0))) (t_2 (* -4.0 (* t a))))
   (if (<= (* b c) -1.95e+305)
     (* b c)
     (if (<= (* b c) -1.1e-48)
       (* j (* k -27.0))
       (if (<= (* b c) -3.3e-143)
         t_2
         (if (<= (* b c) -5e-324)
           t_1
           (if (<= (* b c) 9.6e-113)
             t_2
             (if (<= (* b c) 8.2e-81)
               t_1
               (if (<= (* b c) 1.6e+125) t_2 (* b c))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = k * (j * -27.0);
	double t_2 = -4.0 * (t * a);
	double tmp;
	if ((b * c) <= -1.95e+305) {
		tmp = b * c;
	} else if ((b * c) <= -1.1e-48) {
		tmp = j * (k * -27.0);
	} else if ((b * c) <= -3.3e-143) {
		tmp = t_2;
	} else if ((b * c) <= -5e-324) {
		tmp = t_1;
	} else if ((b * c) <= 9.6e-113) {
		tmp = t_2;
	} else if ((b * c) <= 8.2e-81) {
		tmp = t_1;
	} else if ((b * c) <= 1.6e+125) {
		tmp = t_2;
	} else {
		tmp = b * c;
	}
	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 = k * (j * (-27.0d0))
    t_2 = (-4.0d0) * (t * a)
    if ((b * c) <= (-1.95d+305)) then
        tmp = b * c
    else if ((b * c) <= (-1.1d-48)) then
        tmp = j * (k * (-27.0d0))
    else if ((b * c) <= (-3.3d-143)) then
        tmp = t_2
    else if ((b * c) <= (-5d-324)) then
        tmp = t_1
    else if ((b * c) <= 9.6d-113) then
        tmp = t_2
    else if ((b * c) <= 8.2d-81) then
        tmp = t_1
    else if ((b * c) <= 1.6d+125) then
        tmp = t_2
    else
        tmp = b * c
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = k * (j * -27.0);
	double t_2 = -4.0 * (t * a);
	double tmp;
	if ((b * c) <= -1.95e+305) {
		tmp = b * c;
	} else if ((b * c) <= -1.1e-48) {
		tmp = j * (k * -27.0);
	} else if ((b * c) <= -3.3e-143) {
		tmp = t_2;
	} else if ((b * c) <= -5e-324) {
		tmp = t_1;
	} else if ((b * c) <= 9.6e-113) {
		tmp = t_2;
	} else if ((b * c) <= 8.2e-81) {
		tmp = t_1;
	} else if ((b * c) <= 1.6e+125) {
		tmp = t_2;
	} else {
		tmp = b * c;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = k * (j * -27.0)
	t_2 = -4.0 * (t * a)
	tmp = 0
	if (b * c) <= -1.95e+305:
		tmp = b * c
	elif (b * c) <= -1.1e-48:
		tmp = j * (k * -27.0)
	elif (b * c) <= -3.3e-143:
		tmp = t_2
	elif (b * c) <= -5e-324:
		tmp = t_1
	elif (b * c) <= 9.6e-113:
		tmp = t_2
	elif (b * c) <= 8.2e-81:
		tmp = t_1
	elif (b * c) <= 1.6e+125:
		tmp = t_2
	else:
		tmp = b * c
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(k * Float64(j * -27.0))
	t_2 = Float64(-4.0 * Float64(t * a))
	tmp = 0.0
	if (Float64(b * c) <= -1.95e+305)
		tmp = Float64(b * c);
	elseif (Float64(b * c) <= -1.1e-48)
		tmp = Float64(j * Float64(k * -27.0));
	elseif (Float64(b * c) <= -3.3e-143)
		tmp = t_2;
	elseif (Float64(b * c) <= -5e-324)
		tmp = t_1;
	elseif (Float64(b * c) <= 9.6e-113)
		tmp = t_2;
	elseif (Float64(b * c) <= 8.2e-81)
		tmp = t_1;
	elseif (Float64(b * c) <= 1.6e+125)
		tmp = t_2;
	else
		tmp = Float64(b * c);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = k * (j * -27.0);
	t_2 = -4.0 * (t * a);
	tmp = 0.0;
	if ((b * c) <= -1.95e+305)
		tmp = b * c;
	elseif ((b * c) <= -1.1e-48)
		tmp = j * (k * -27.0);
	elseif ((b * c) <= -3.3e-143)
		tmp = t_2;
	elseif ((b * c) <= -5e-324)
		tmp = t_1;
	elseif ((b * c) <= 9.6e-113)
		tmp = t_2;
	elseif ((b * c) <= 8.2e-81)
		tmp = t_1;
	elseif ((b * c) <= 1.6e+125)
		tmp = t_2;
	else
		tmp = b * c;
	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]}, Block[{t$95$2 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.95e+305], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.1e-48], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.3e-143], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -5e-324], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 9.6e-113], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 8.2e-81], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.6e+125], t$95$2, N[(b * c), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
t_2 := -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305}:\\
\;\;\;\;b \cdot c\\

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

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

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

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

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

\mathbf{elif}\;b \cdot c \leq 1.6 \cdot 10^{+125}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 b c) < -1.95e305 or 1.59999999999999992e125 < (*.f64 b c)

    1. Initial program 81.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. Simplified86.6%

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

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

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

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

    if -1.95e305 < (*.f64 b c) < -1.10000000000000006e-48

    1. Initial program 89.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. Simplified91.7%

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

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    7. Step-by-step derivation
      1. associate-*r*36.8%

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

        \[\leadsto \color{blue}{\left(j \cdot -27\right)} \cdot k \]
      3. associate-*r*36.8%

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

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

    if -1.10000000000000006e-48 < (*.f64 b c) < -3.3000000000000001e-143 or -4.94066e-324 < (*.f64 b c) < 9.60000000000000049e-113 or 8.19999999999999968e-81 < (*.f64 b c) < 1.59999999999999992e125

    1. Initial program 87.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. Simplified90.7%

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

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

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

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

    if -3.3000000000000001e-143 < (*.f64 b c) < -4.94066e-324 or 9.60000000000000049e-113 < (*.f64 b c) < 8.19999999999999968e-81

    1. Initial program 94.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. Simplified94.4%

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    5. Step-by-step derivation
      1. *-commutative54.5%

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

        \[\leadsto \color{blue}{\left(k \cdot j\right)} \cdot -27 \]
      3. associate-*r*54.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.1 \cdot 10^{-48}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -3.3 \cdot 10^{-143}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-324}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq 9.6 \cdot 10^{-113}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 8.2 \cdot 10^{-81}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq 1.6 \cdot 10^{+125}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 33.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := k \cdot \left(j \cdot -27\right)\\ t_2 := -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.3 \cdot 10^{-58}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -1.3 \cdot 10^{-132}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-324}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \cdot c \leq 4.5 \cdot 10^{-113}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \cdot c \leq 4.5 \cdot 10^{-77}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \cdot c \leq 2.3 \cdot 10^{+127}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* k (* j -27.0))) (t_2 (* -4.0 (* t a))))
   (if (<= (* b c) -1.95e+305)
     (* b c)
     (if (<= (* b c) -1.3e-58)
       (* j (* k -27.0))
       (if (<= (* b c) -1.3e-132)
         (* x (* i -4.0))
         (if (<= (* b c) -5e-324)
           t_1
           (if (<= (* b c) 4.5e-113)
             t_2
             (if (<= (* b c) 4.5e-77)
               t_1
               (if (<= (* b c) 2.3e+127) t_2 (* b c))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = k * (j * -27.0);
	double t_2 = -4.0 * (t * a);
	double tmp;
	if ((b * c) <= -1.95e+305) {
		tmp = b * c;
	} else if ((b * c) <= -1.3e-58) {
		tmp = j * (k * -27.0);
	} else if ((b * c) <= -1.3e-132) {
		tmp = x * (i * -4.0);
	} else if ((b * c) <= -5e-324) {
		tmp = t_1;
	} else if ((b * c) <= 4.5e-113) {
		tmp = t_2;
	} else if ((b * c) <= 4.5e-77) {
		tmp = t_1;
	} else if ((b * c) <= 2.3e+127) {
		tmp = t_2;
	} else {
		tmp = b * c;
	}
	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 = k * (j * (-27.0d0))
    t_2 = (-4.0d0) * (t * a)
    if ((b * c) <= (-1.95d+305)) then
        tmp = b * c
    else if ((b * c) <= (-1.3d-58)) then
        tmp = j * (k * (-27.0d0))
    else if ((b * c) <= (-1.3d-132)) then
        tmp = x * (i * (-4.0d0))
    else if ((b * c) <= (-5d-324)) then
        tmp = t_1
    else if ((b * c) <= 4.5d-113) then
        tmp = t_2
    else if ((b * c) <= 4.5d-77) then
        tmp = t_1
    else if ((b * c) <= 2.3d+127) then
        tmp = t_2
    else
        tmp = b * c
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = k * (j * -27.0);
	double t_2 = -4.0 * (t * a);
	double tmp;
	if ((b * c) <= -1.95e+305) {
		tmp = b * c;
	} else if ((b * c) <= -1.3e-58) {
		tmp = j * (k * -27.0);
	} else if ((b * c) <= -1.3e-132) {
		tmp = x * (i * -4.0);
	} else if ((b * c) <= -5e-324) {
		tmp = t_1;
	} else if ((b * c) <= 4.5e-113) {
		tmp = t_2;
	} else if ((b * c) <= 4.5e-77) {
		tmp = t_1;
	} else if ((b * c) <= 2.3e+127) {
		tmp = t_2;
	} else {
		tmp = b * c;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = k * (j * -27.0)
	t_2 = -4.0 * (t * a)
	tmp = 0
	if (b * c) <= -1.95e+305:
		tmp = b * c
	elif (b * c) <= -1.3e-58:
		tmp = j * (k * -27.0)
	elif (b * c) <= -1.3e-132:
		tmp = x * (i * -4.0)
	elif (b * c) <= -5e-324:
		tmp = t_1
	elif (b * c) <= 4.5e-113:
		tmp = t_2
	elif (b * c) <= 4.5e-77:
		tmp = t_1
	elif (b * c) <= 2.3e+127:
		tmp = t_2
	else:
		tmp = b * c
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(k * Float64(j * -27.0))
	t_2 = Float64(-4.0 * Float64(t * a))
	tmp = 0.0
	if (Float64(b * c) <= -1.95e+305)
		tmp = Float64(b * c);
	elseif (Float64(b * c) <= -1.3e-58)
		tmp = Float64(j * Float64(k * -27.0));
	elseif (Float64(b * c) <= -1.3e-132)
		tmp = Float64(x * Float64(i * -4.0));
	elseif (Float64(b * c) <= -5e-324)
		tmp = t_1;
	elseif (Float64(b * c) <= 4.5e-113)
		tmp = t_2;
	elseif (Float64(b * c) <= 4.5e-77)
		tmp = t_1;
	elseif (Float64(b * c) <= 2.3e+127)
		tmp = t_2;
	else
		tmp = Float64(b * c);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = k * (j * -27.0);
	t_2 = -4.0 * (t * a);
	tmp = 0.0;
	if ((b * c) <= -1.95e+305)
		tmp = b * c;
	elseif ((b * c) <= -1.3e-58)
		tmp = j * (k * -27.0);
	elseif ((b * c) <= -1.3e-132)
		tmp = x * (i * -4.0);
	elseif ((b * c) <= -5e-324)
		tmp = t_1;
	elseif ((b * c) <= 4.5e-113)
		tmp = t_2;
	elseif ((b * c) <= 4.5e-77)
		tmp = t_1;
	elseif ((b * c) <= 2.3e+127)
		tmp = t_2;
	else
		tmp = b * c;
	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]}, Block[{t$95$2 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.95e+305], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.3e-58], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.3e-132], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5e-324], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 4.5e-113], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 4.5e-77], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 2.3e+127], t$95$2, N[(b * c), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
t_2 := -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305}:\\
\;\;\;\;b \cdot c\\

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

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

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

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

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

\mathbf{elif}\;b \cdot c \leq 2.3 \cdot 10^{+127}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (*.f64 b c) < -1.95e305 or 2.3000000000000002e127 < (*.f64 b c)

    1. Initial program 81.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. Simplified86.6%

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

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

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

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

    if -1.95e305 < (*.f64 b c) < -1.30000000000000003e-58

    1. Initial program 89.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. Simplified91.9%

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

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

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    7. Step-by-step derivation
      1. associate-*r*36.1%

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

        \[\leadsto \color{blue}{\left(j \cdot -27\right)} \cdot k \]
      3. associate-*r*36.1%

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

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

    if -1.30000000000000003e-58 < (*.f64 b c) < -1.3e-132

    1. Initial program 86.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. Simplified86.9%

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. associate-*r*67.8%

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

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

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

    if -1.3e-132 < (*.f64 b c) < -4.94066e-324 or 4.5000000000000001e-113 < (*.f64 b c) < 4.5000000000000001e-77

    1. Initial program 94.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. Simplified95.0%

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

      \[\leadsto \color{blue}{-27 \cdot \left(j \cdot k\right)} \]
    5. Step-by-step derivation
      1. *-commutative51.5%

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

        \[\leadsto \color{blue}{\left(k \cdot j\right)} \cdot -27 \]
      3. associate-*r*51.5%

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

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

    if -4.94066e-324 < (*.f64 b c) < 4.5000000000000001e-113 or 4.5000000000000001e-77 < (*.f64 b c) < 2.3000000000000002e127

    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. Simplified90.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.3 \cdot 10^{-58}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -1.3 \cdot 10^{-132}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-324}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq 4.5 \cdot 10^{-113}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 4.5 \cdot 10^{-77}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq 2.3 \cdot 10^{+127}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 54.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := b \cdot c + t\_1\\ \mathbf{if}\;b \cdot c \leq -5.7 \cdot 10^{+209}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \cdot c \leq -7.2 \cdot 10^{+179}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -5.5 \cdot 10^{+58}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;b \cdot c \leq -8.8 \cdot 10^{-110}:\\ \;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 1.15 \cdot 10^{+124}:\\ \;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\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 (* j (* k -27.0))) (t_2 (+ (* b c) t_1)))
   (if (<= (* b c) -5.7e+209)
     t_2
     (if (<= (* b c) -7.2e+179)
       (* t (+ (* 18.0 (* x (* y z))) (* a -4.0)))
       (if (<= (* b c) -5.5e+58)
         t_2
         (if (<= (* b c) -8.8e-110)
           (+ t_1 (* x (* i -4.0)))
           (if (<= (* b c) 1.15e+124) (+ t_1 (* -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 = j * (k * -27.0);
	double t_2 = (b * c) + t_1;
	double tmp;
	if ((b * c) <= -5.7e+209) {
		tmp = t_2;
	} else if ((b * c) <= -7.2e+179) {
		tmp = t * ((18.0 * (x * (y * z))) + (a * -4.0));
	} else if ((b * c) <= -5.5e+58) {
		tmp = t_2;
	} else if ((b * c) <= -8.8e-110) {
		tmp = t_1 + (x * (i * -4.0));
	} else if ((b * c) <= 1.15e+124) {
		tmp = t_1 + (-4.0 * (t * a));
	} 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 = j * (k * (-27.0d0))
    t_2 = (b * c) + t_1
    if ((b * c) <= (-5.7d+209)) then
        tmp = t_2
    else if ((b * c) <= (-7.2d+179)) then
        tmp = t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0)))
    else if ((b * c) <= (-5.5d+58)) then
        tmp = t_2
    else if ((b * c) <= (-8.8d-110)) then
        tmp = t_1 + (x * (i * (-4.0d0)))
    else if ((b * c) <= 1.15d+124) then
        tmp = t_1 + ((-4.0d0) * (t * a))
    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 = j * (k * -27.0);
	double t_2 = (b * c) + t_1;
	double tmp;
	if ((b * c) <= -5.7e+209) {
		tmp = t_2;
	} else if ((b * c) <= -7.2e+179) {
		tmp = t * ((18.0 * (x * (y * z))) + (a * -4.0));
	} else if ((b * c) <= -5.5e+58) {
		tmp = t_2;
	} else if ((b * c) <= -8.8e-110) {
		tmp = t_1 + (x * (i * -4.0));
	} else if ((b * c) <= 1.15e+124) {
		tmp = t_1 + (-4.0 * (t * a));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = (b * c) + t_1
	tmp = 0
	if (b * c) <= -5.7e+209:
		tmp = t_2
	elif (b * c) <= -7.2e+179:
		tmp = t * ((18.0 * (x * (y * z))) + (a * -4.0))
	elif (b * c) <= -5.5e+58:
		tmp = t_2
	elif (b * c) <= -8.8e-110:
		tmp = t_1 + (x * (i * -4.0))
	elif (b * c) <= 1.15e+124:
		tmp = t_1 + (-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(j * Float64(k * -27.0))
	t_2 = Float64(Float64(b * c) + t_1)
	tmp = 0.0
	if (Float64(b * c) <= -5.7e+209)
		tmp = t_2;
	elseif (Float64(b * c) <= -7.2e+179)
		tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0)));
	elseif (Float64(b * c) <= -5.5e+58)
		tmp = t_2;
	elseif (Float64(b * c) <= -8.8e-110)
		tmp = Float64(t_1 + Float64(x * Float64(i * -4.0)));
	elseif (Float64(b * c) <= 1.15e+124)
		tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a)));
	else
		tmp = t_2;
	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 = (b * c) + t_1;
	tmp = 0.0;
	if ((b * c) <= -5.7e+209)
		tmp = t_2;
	elseif ((b * c) <= -7.2e+179)
		tmp = t * ((18.0 * (x * (y * z))) + (a * -4.0));
	elseif ((b * c) <= -5.5e+58)
		tmp = t_2;
	elseif ((b * c) <= -8.8e-110)
		tmp = t_1 + (x * (i * -4.0));
	elseif ((b * c) <= 1.15e+124)
		tmp = t_1 + (-4.0 * (t * a));
	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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -5.7e+209], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -7.2e+179], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5.5e+58], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -8.8e-110], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.15e+124], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;b \cdot c \leq -7.2 \cdot 10^{+179}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\

\mathbf{elif}\;b \cdot c \leq -5.5 \cdot 10^{+58}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \cdot c \leq -8.8 \cdot 10^{-110}:\\
\;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 b c) < -5.7000000000000001e209 or -7.1999999999999995e179 < (*.f64 b c) < -5.4999999999999999e58 or 1.14999999999999992e124 < (*.f64 b c)

    1. Initial program 83.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. Simplified86.8%

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

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

    if -5.7000000000000001e209 < (*.f64 b c) < -7.1999999999999995e179

    1. Initial program 88.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. Simplified100.0%

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

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

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

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

    if -5.4999999999999999e58 < (*.f64 b c) < -8.7999999999999997e-110

    1. Initial program 88.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. Simplified88.4%

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. associate-*r*79.5%

        \[\leadsto \color{blue}{\left(-4 \cdot i\right) \cdot x} + j \cdot \left(k \cdot -27\right) \]
      2. *-commutative79.5%

        \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} + j \cdot \left(k \cdot -27\right) \]
    6. Simplified79.5%

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

    if -8.7999999999999997e-110 < (*.f64 b c) < 1.14999999999999992e124

    1. Initial program 89.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. Simplified92.3%

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. *-commutative61.2%

        \[\leadsto -4 \cdot \color{blue}{\left(t \cdot a\right)} + j \cdot \left(k \cdot -27\right) \]
    6. Simplified61.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -5.7 \cdot 10^{+209}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -7.2 \cdot 10^{+179}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -5.5 \cdot 10^{+58}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -8.8 \cdot 10^{-110}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 1.15 \cdot 10^{+124}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 41.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\ t_2 := -27 \cdot \left(j \cdot k\right)\\ t_3 := x \cdot \left(i \cdot -4\right)\\ \mathbf{if}\;i \leq -2.5 \cdot 10^{+106}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;i \leq -2.6 \cdot 10^{-193}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;i \leq -1.31 \cdot 10^{-291}:\\ \;\;\;\;18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;i \leq 8.8 \cdot 10^{-290}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;i \leq 1.45 \cdot 10^{-41}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;i \leq 1650000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;i \leq 2.9 \cdot 10^{+188}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (+ (* b c) (* -4.0 (* t a))))
        (t_2 (* -27.0 (* j k)))
        (t_3 (* x (* i -4.0))))
   (if (<= i -2.5e+106)
     t_3
     (if (<= i -2.6e-193)
       t_1
       (if (<= i -1.31e-291)
         (* 18.0 (* x (* z (* y t))))
         (if (<= i 8.8e-290)
           t_2
           (if (<= i 1.45e-41)
             t_1
             (if (<= i 1650000.0) t_2 (if (<= i 2.9e+188) t_1 t_3)))))))))
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 = (b * c) + (-4.0 * (t * a));
	double t_2 = -27.0 * (j * k);
	double t_3 = x * (i * -4.0);
	double tmp;
	if (i <= -2.5e+106) {
		tmp = t_3;
	} else if (i <= -2.6e-193) {
		tmp = t_1;
	} else if (i <= -1.31e-291) {
		tmp = 18.0 * (x * (z * (y * t)));
	} else if (i <= 8.8e-290) {
		tmp = t_2;
	} else if (i <= 1.45e-41) {
		tmp = t_1;
	} else if (i <= 1650000.0) {
		tmp = t_2;
	} else if (i <= 2.9e+188) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	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) :: t_3
    real(8) :: tmp
    t_1 = (b * c) + ((-4.0d0) * (t * a))
    t_2 = (-27.0d0) * (j * k)
    t_3 = x * (i * (-4.0d0))
    if (i <= (-2.5d+106)) then
        tmp = t_3
    else if (i <= (-2.6d-193)) then
        tmp = t_1
    else if (i <= (-1.31d-291)) then
        tmp = 18.0d0 * (x * (z * (y * t)))
    else if (i <= 8.8d-290) then
        tmp = t_2
    else if (i <= 1.45d-41) then
        tmp = t_1
    else if (i <= 1650000.0d0) then
        tmp = t_2
    else if (i <= 2.9d+188) then
        tmp = t_1
    else
        tmp = t_3
    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 = (b * c) + (-4.0 * (t * a));
	double t_2 = -27.0 * (j * k);
	double t_3 = x * (i * -4.0);
	double tmp;
	if (i <= -2.5e+106) {
		tmp = t_3;
	} else if (i <= -2.6e-193) {
		tmp = t_1;
	} else if (i <= -1.31e-291) {
		tmp = 18.0 * (x * (z * (y * t)));
	} else if (i <= 8.8e-290) {
		tmp = t_2;
	} else if (i <= 1.45e-41) {
		tmp = t_1;
	} else if (i <= 1650000.0) {
		tmp = t_2;
	} else if (i <= 2.9e+188) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (b * c) + (-4.0 * (t * a))
	t_2 = -27.0 * (j * k)
	t_3 = x * (i * -4.0)
	tmp = 0
	if i <= -2.5e+106:
		tmp = t_3
	elif i <= -2.6e-193:
		tmp = t_1
	elif i <= -1.31e-291:
		tmp = 18.0 * (x * (z * (y * t)))
	elif i <= 8.8e-290:
		tmp = t_2
	elif i <= 1.45e-41:
		tmp = t_1
	elif i <= 1650000.0:
		tmp = t_2
	elif i <= 2.9e+188:
		tmp = t_1
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a)))
	t_2 = Float64(-27.0 * Float64(j * k))
	t_3 = Float64(x * Float64(i * -4.0))
	tmp = 0.0
	if (i <= -2.5e+106)
		tmp = t_3;
	elseif (i <= -2.6e-193)
		tmp = t_1;
	elseif (i <= -1.31e-291)
		tmp = Float64(18.0 * Float64(x * Float64(z * Float64(y * t))));
	elseif (i <= 8.8e-290)
		tmp = t_2;
	elseif (i <= 1.45e-41)
		tmp = t_1;
	elseif (i <= 1650000.0)
		tmp = t_2;
	elseif (i <= 2.9e+188)
		tmp = t_1;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (b * c) + (-4.0 * (t * a));
	t_2 = -27.0 * (j * k);
	t_3 = x * (i * -4.0);
	tmp = 0.0;
	if (i <= -2.5e+106)
		tmp = t_3;
	elseif (i <= -2.6e-193)
		tmp = t_1;
	elseif (i <= -1.31e-291)
		tmp = 18.0 * (x * (z * (y * t)));
	elseif (i <= 8.8e-290)
		tmp = t_2;
	elseif (i <= 1.45e-41)
		tmp = t_1;
	elseif (i <= 1650000.0)
		tmp = t_2;
	elseif (i <= 2.9e+188)
		tmp = t_1;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -2.5e+106], t$95$3, If[LessEqual[i, -2.6e-193], t$95$1, If[LessEqual[i, -1.31e-291], N[(18.0 * N[(x * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 8.8e-290], t$95$2, If[LessEqual[i, 1.45e-41], t$95$1, If[LessEqual[i, 1650000.0], t$95$2, If[LessEqual[i, 2.9e+188], t$95$1, t$95$3]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
t_2 := -27 \cdot \left(j \cdot k\right)\\
t_3 := x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;i \leq -2.5 \cdot 10^{+106}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;i \leq -2.6 \cdot 10^{-193}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;i \leq 8.8 \cdot 10^{-290}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;i \leq 1.45 \cdot 10^{-41}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;i \leq 1650000:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;i \leq 2.9 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if i < -2.4999999999999999e106 or 2.8999999999999999e188 < i

    1. Initial program 84.8%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified87.5%

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. associate-*r*55.9%

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

        \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} \]
    8. Simplified55.9%

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

    if -2.4999999999999999e106 < i < -2.60000000000000008e-193 or 8.8000000000000004e-290 < i < 1.44999999999999989e-41 or 1.65e6 < i < 2.8999999999999999e188

    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. Simplified90.9%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 75.5%

      \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right) + b \cdot c\right) - 27 \cdot \left(j \cdot k\right)} \]
    5. Step-by-step derivation
      1. associate--l+75.5%

        \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + \left(b \cdot c - 27 \cdot \left(j \cdot k\right)\right)} \]
      2. *-commutative75.5%

        \[\leadsto -4 \cdot \color{blue}{\left(t \cdot a\right)} + \left(b \cdot c - 27 \cdot \left(j \cdot k\right)\right) \]
      3. associate-*r*75.5%

        \[\leadsto \color{blue}{\left(-4 \cdot t\right) \cdot a} + \left(b \cdot c - 27 \cdot \left(j \cdot k\right)\right) \]
      4. fma-def76.2%

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

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

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

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

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

    if -2.60000000000000008e-193 < i < -1.31e-291

    1. Initial program 76.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. Simplified76.8%

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

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

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

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

        \[\leadsto 18 \cdot \color{blue}{\left(\left(x \cdot \left(y \cdot z\right)\right) \cdot t\right)} \]
      2. associate-*l*46.4%

        \[\leadsto 18 \cdot \color{blue}{\left(x \cdot \left(\left(y \cdot z\right) \cdot t\right)\right)} \]
      3. *-commutative46.4%

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

        \[\leadsto 18 \cdot \left(x \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot z\right)}\right) \]
      5. *-commutative58.0%

        \[\leadsto 18 \cdot \left(x \cdot \color{blue}{\left(z \cdot \left(t \cdot y\right)\right)}\right) \]
    8. Simplified58.0%

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

    if -1.31e-291 < i < 8.8000000000000004e-290 or 1.44999999999999989e-41 < i < 1.65e6

    1. Initial program 81.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. Simplified93.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;i \leq -2.5 \cdot 10^{+106}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;i \leq -2.6 \cdot 10^{-193}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;i \leq -1.31 \cdot 10^{-291}:\\ \;\;\;\;18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;i \leq 8.8 \cdot 10^{-290}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;i \leq 1.45 \cdot 10^{-41}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;i \leq 1650000:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;i \leq 2.9 \cdot 10^{+188}:\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 46.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\ t_3 := t\_1 + -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;c \leq -6.2 \cdot 10^{-228}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;c \leq -5.2 \cdot 10^{-280}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;c \leq 4.6 \cdot 10^{-265}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;c \leq 2.8 \cdot 10^{-65}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;c \leq 72000000000000:\\ \;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;c \leq 4.5 \cdot 10^{+91}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + 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 (* t (+ (* 18.0 (* x (* y z))) (* a -4.0))))
        (t_3 (+ t_1 (* -4.0 (* t a)))))
   (if (<= c -6.2e-228)
     t_2
     (if (<= c -5.2e-280)
       t_3
       (if (<= c 4.6e-265)
         t_2
         (if (<= c 2.8e-65)
           t_3
           (if (<= c 72000000000000.0)
             (+ t_1 (* x (* i -4.0)))
             (if (<= c 4.5e+91)
               (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
               (+ (* b c) t_1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double t_2 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
	double t_3 = t_1 + (-4.0 * (t * a));
	double tmp;
	if (c <= -6.2e-228) {
		tmp = t_2;
	} else if (c <= -5.2e-280) {
		tmp = t_3;
	} else if (c <= 4.6e-265) {
		tmp = t_2;
	} else if (c <= 2.8e-65) {
		tmp = t_3;
	} else if (c <= 72000000000000.0) {
		tmp = t_1 + (x * (i * -4.0));
	} else if (c <= 4.5e+91) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else {
		tmp = (b * c) + 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) :: t_3
    real(8) :: tmp
    t_1 = j * (k * (-27.0d0))
    t_2 = t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0)))
    t_3 = t_1 + ((-4.0d0) * (t * a))
    if (c <= (-6.2d-228)) then
        tmp = t_2
    else if (c <= (-5.2d-280)) then
        tmp = t_3
    else if (c <= 4.6d-265) then
        tmp = t_2
    else if (c <= 2.8d-65) then
        tmp = t_3
    else if (c <= 72000000000000.0d0) then
        tmp = t_1 + (x * (i * (-4.0d0)))
    else if (c <= 4.5d+91) then
        tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    else
        tmp = (b * c) + 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 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
	double t_3 = t_1 + (-4.0 * (t * a));
	double tmp;
	if (c <= -6.2e-228) {
		tmp = t_2;
	} else if (c <= -5.2e-280) {
		tmp = t_3;
	} else if (c <= 4.6e-265) {
		tmp = t_2;
	} else if (c <= 2.8e-65) {
		tmp = t_3;
	} else if (c <= 72000000000000.0) {
		tmp = t_1 + (x * (i * -4.0));
	} else if (c <= 4.5e+91) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} else {
		tmp = (b * c) + t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = t * ((18.0 * (x * (y * z))) + (a * -4.0))
	t_3 = t_1 + (-4.0 * (t * a))
	tmp = 0
	if c <= -6.2e-228:
		tmp = t_2
	elif c <= -5.2e-280:
		tmp = t_3
	elif c <= 4.6e-265:
		tmp = t_2
	elif c <= 2.8e-65:
		tmp = t_3
	elif c <= 72000000000000.0:
		tmp = t_1 + (x * (i * -4.0))
	elif c <= 4.5e+91:
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	else:
		tmp = (b * c) + 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(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0)))
	t_3 = Float64(t_1 + Float64(-4.0 * Float64(t * a)))
	tmp = 0.0
	if (c <= -6.2e-228)
		tmp = t_2;
	elseif (c <= -5.2e-280)
		tmp = t_3;
	elseif (c <= 4.6e-265)
		tmp = t_2;
	elseif (c <= 2.8e-65)
		tmp = t_3;
	elseif (c <= 72000000000000.0)
		tmp = Float64(t_1 + Float64(x * Float64(i * -4.0)));
	elseif (c <= 4.5e+91)
		tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)));
	else
		tmp = Float64(Float64(b * c) + 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 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
	t_3 = t_1 + (-4.0 * (t * a));
	tmp = 0.0;
	if (c <= -6.2e-228)
		tmp = t_2;
	elseif (c <= -5.2e-280)
		tmp = t_3;
	elseif (c <= 4.6e-265)
		tmp = t_2;
	elseif (c <= 2.8e-65)
		tmp = t_3;
	elseif (c <= 72000000000000.0)
		tmp = t_1 + (x * (i * -4.0));
	elseif (c <= 4.5e+91)
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	else
		tmp = (b * c) + 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[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -6.2e-228], t$95$2, If[LessEqual[c, -5.2e-280], t$95$3, If[LessEqual[c, 4.6e-265], t$95$2, If[LessEqual[c, 2.8e-65], t$95$3, If[LessEqual[c, 72000000000000.0], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.5e+91], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\
t_3 := t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;c \leq -6.2 \cdot 10^{-228}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;c \leq -5.2 \cdot 10^{-280}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;c \leq 4.6 \cdot 10^{-265}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;c \leq 2.8 \cdot 10^{-65}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;c \leq 72000000000000:\\
\;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\

\mathbf{elif}\;c \leq 4.5 \cdot 10^{+91}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -6.1999999999999996e-228 or -5.2e-280 < c < 4.5999999999999998e-265

    1. Initial program 85.4%

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

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

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

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

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

    if -6.1999999999999996e-228 < c < -5.2e-280 or 4.5999999999999998e-265 < c < 2.8e-65

    1. Initial program 92.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. Simplified94.1%

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. *-commutative72.5%

        \[\leadsto -4 \cdot \color{blue}{\left(t \cdot a\right)} + j \cdot \left(k \cdot -27\right) \]
    6. Simplified72.5%

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

    if 2.8e-65 < c < 7.2e13

    1. Initial program 93.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. Simplified87.6%

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. associate-*r*63.6%

        \[\leadsto \color{blue}{\left(-4 \cdot i\right) \cdot x} + j \cdot \left(k \cdot -27\right) \]
      2. *-commutative63.6%

        \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} + j \cdot \left(k \cdot -27\right) \]
    6. Simplified63.6%

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

    if 7.2e13 < c < 4.5e91

    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. Simplified87.8%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 55.4%

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

    if 4.5e91 < c

    1. Initial program 84.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified94.2%

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

      \[\leadsto \color{blue}{b \cdot c} + j \cdot \left(k \cdot -27\right) \]
  3. Recombined 5 regimes into one program.
  4. Final simplification60.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -6.2 \cdot 10^{-228}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\ \mathbf{elif}\;c \leq -5.2 \cdot 10^{-280}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;c \leq 4.6 \cdot 10^{-265}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\ \mathbf{elif}\;c \leq 2.8 \cdot 10^{-65}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;c \leq 72000000000000:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;c \leq 4.5 \cdot 10^{+91}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 46.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\ t_3 := t\_1 + -4 \cdot \left(t \cdot a\right)\\ \mathbf{if}\;c \leq -5 \cdot 10^{-231}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;c \leq -1.5 \cdot 10^{-281}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;c \leq 3.5 \cdot 10^{-265}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;c \leq 5.1 \cdot 10^{-64}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;c \leq 250000000000:\\ \;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;c \leq 5.5 \cdot 10^{+92}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + 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 (* t (+ (* 18.0 (* x (* y z))) (* a -4.0))))
        (t_3 (+ t_1 (* -4.0 (* t a)))))
   (if (<= c -5e-231)
     t_2
     (if (<= c -1.5e-281)
       t_3
       (if (<= c 3.5e-265)
         t_2
         (if (<= c 5.1e-64)
           t_3
           (if (<= c 250000000000.0)
             (+ t_1 (* x (* i -4.0)))
             (if (<= c 5.5e+92)
               (* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))
               (+ (* b c) t_1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = j * (k * -27.0);
	double t_2 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
	double t_3 = t_1 + (-4.0 * (t * a));
	double tmp;
	if (c <= -5e-231) {
		tmp = t_2;
	} else if (c <= -1.5e-281) {
		tmp = t_3;
	} else if (c <= 3.5e-265) {
		tmp = t_2;
	} else if (c <= 5.1e-64) {
		tmp = t_3;
	} else if (c <= 250000000000.0) {
		tmp = t_1 + (x * (i * -4.0));
	} else if (c <= 5.5e+92) {
		tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
	} else {
		tmp = (b * c) + 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) :: t_3
    real(8) :: tmp
    t_1 = j * (k * (-27.0d0))
    t_2 = t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0)))
    t_3 = t_1 + ((-4.0d0) * (t * a))
    if (c <= (-5d-231)) then
        tmp = t_2
    else if (c <= (-1.5d-281)) then
        tmp = t_3
    else if (c <= 3.5d-265) then
        tmp = t_2
    else if (c <= 5.1d-64) then
        tmp = t_3
    else if (c <= 250000000000.0d0) then
        tmp = t_1 + (x * (i * (-4.0d0)))
    else if (c <= 5.5d+92) then
        tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
    else
        tmp = (b * c) + 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 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
	double t_3 = t_1 + (-4.0 * (t * a));
	double tmp;
	if (c <= -5e-231) {
		tmp = t_2;
	} else if (c <= -1.5e-281) {
		tmp = t_3;
	} else if (c <= 3.5e-265) {
		tmp = t_2;
	} else if (c <= 5.1e-64) {
		tmp = t_3;
	} else if (c <= 250000000000.0) {
		tmp = t_1 + (x * (i * -4.0));
	} else if (c <= 5.5e+92) {
		tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
	} else {
		tmp = (b * c) + t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = j * (k * -27.0)
	t_2 = t * ((18.0 * (x * (y * z))) + (a * -4.0))
	t_3 = t_1 + (-4.0 * (t * a))
	tmp = 0
	if c <= -5e-231:
		tmp = t_2
	elif c <= -1.5e-281:
		tmp = t_3
	elif c <= 3.5e-265:
		tmp = t_2
	elif c <= 5.1e-64:
		tmp = t_3
	elif c <= 250000000000.0:
		tmp = t_1 + (x * (i * -4.0))
	elif c <= 5.5e+92:
		tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i))
	else:
		tmp = (b * c) + 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(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0)))
	t_3 = Float64(t_1 + Float64(-4.0 * Float64(t * a)))
	tmp = 0.0
	if (c <= -5e-231)
		tmp = t_2;
	elseif (c <= -1.5e-281)
		tmp = t_3;
	elseif (c <= 3.5e-265)
		tmp = t_2;
	elseif (c <= 5.1e-64)
		tmp = t_3;
	elseif (c <= 250000000000.0)
		tmp = Float64(t_1 + Float64(x * Float64(i * -4.0)));
	elseif (c <= 5.5e+92)
		tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i)));
	else
		tmp = Float64(Float64(b * c) + 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 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
	t_3 = t_1 + (-4.0 * (t * a));
	tmp = 0.0;
	if (c <= -5e-231)
		tmp = t_2;
	elseif (c <= -1.5e-281)
		tmp = t_3;
	elseif (c <= 3.5e-265)
		tmp = t_2;
	elseif (c <= 5.1e-64)
		tmp = t_3;
	elseif (c <= 250000000000.0)
		tmp = t_1 + (x * (i * -4.0));
	elseif (c <= 5.5e+92)
		tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
	else
		tmp = (b * c) + 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[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -5e-231], t$95$2, If[LessEqual[c, -1.5e-281], t$95$3, If[LessEqual[c, 3.5e-265], t$95$2, If[LessEqual[c, 5.1e-64], t$95$3, If[LessEqual[c, 250000000000.0], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 5.5e+92], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\
t_3 := t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;c \leq -5 \cdot 10^{-231}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;c \leq -1.5 \cdot 10^{-281}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;c \leq 3.5 \cdot 10^{-265}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;c \leq 5.1 \cdot 10^{-64}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;c \leq 250000000000:\\
\;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\

\mathbf{elif}\;c \leq 5.5 \cdot 10^{+92}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if c < -5.00000000000000023e-231 or -1.49999999999999987e-281 < c < 3.50000000000000015e-265

    1. Initial program 85.4%

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

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

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

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

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

    if -5.00000000000000023e-231 < c < -1.49999999999999987e-281 or 3.50000000000000015e-265 < c < 5.09999999999999984e-64

    1. Initial program 92.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. Simplified94.1%

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. *-commutative72.5%

        \[\leadsto -4 \cdot \color{blue}{\left(t \cdot a\right)} + j \cdot \left(k \cdot -27\right) \]
    6. Simplified72.5%

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

    if 5.09999999999999984e-64 < c < 2.5e11

    1. Initial program 93.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. Simplified87.6%

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. associate-*r*63.6%

        \[\leadsto \color{blue}{\left(-4 \cdot i\right) \cdot x} + j \cdot \left(k \cdot -27\right) \]
      2. *-commutative63.6%

        \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} + j \cdot \left(k \cdot -27\right) \]
    6. Simplified63.6%

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

    if 2.5e11 < c < 5.50000000000000053e92

    1. Initial program 88.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified88.3%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 53.2%

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

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-udef32.8%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)} - 1\right)} - 4 \cdot i\right) \]
    6. Applied egg-rr32.8%

      \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)} - 1\right)} - 4 \cdot i\right) \]
    7. Step-by-step derivation
      1. expm1-def32.7%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-log1p53.2%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(t \cdot \left(y \cdot z\right)\right)} - 4 \cdot i\right) \]
      3. *-commutative53.2%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\right)} - 4 \cdot i\right) \]
      4. associate-*l*56.9%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(y \cdot \left(z \cdot t\right)\right)} - 4 \cdot i\right) \]
    8. Simplified56.9%

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

    if 5.50000000000000053e92 < c

    1. Initial program 83.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. Simplified94.1%

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

      \[\leadsto \color{blue}{b \cdot c} + j \cdot \left(k \cdot -27\right) \]
  3. Recombined 5 regimes into one program.
  4. Final simplification60.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;c \leq -5 \cdot 10^{-231}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\ \mathbf{elif}\;c \leq -1.5 \cdot 10^{-281}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;c \leq 3.5 \cdot 10^{-265}:\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\ \mathbf{elif}\;c \leq 5.1 \cdot 10^{-64}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;c \leq 250000000000:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;c \leq 5.5 \cdot 10^{+92}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 67.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+183} \lor \neg \left(x \leq 6.8 \cdot 10^{-48} \lor \neg \left(x \leq 0.0205\right) \land x \leq 1.18 \cdot 10^{+225}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= x -9.5e+183)
         (not (or (<= x 6.8e-48) (and (not (<= x 0.0205)) (<= x 1.18e+225)))))
   (* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))
   (- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if ((x <= -9.5e+183) || !((x <= 6.8e-48) || (!(x <= 0.0205) && (x <= 1.18e+225)))) {
		tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
	} else {
		tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
	}
	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 ((x <= (-9.5d+183)) .or. (.not. (x <= 6.8d-48) .or. (.not. (x <= 0.0205d0)) .and. (x <= 1.18d+225))) then
        tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
    else
        tmp = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if ((x <= -9.5e+183) || !((x <= 6.8e-48) || (!(x <= 0.0205) && (x <= 1.18e+225)))) {
		tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
	} else {
		tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (x <= -9.5e+183) or not ((x <= 6.8e-48) or (not (x <= 0.0205) and (x <= 1.18e+225))):
		tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i))
	else:
		tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((x <= -9.5e+183) || !((x <= 6.8e-48) || (!(x <= 0.0205) && (x <= 1.18e+225))))
		tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i)));
	else
		tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((x <= -9.5e+183) || ~(((x <= 6.8e-48) || (~((x <= 0.0205)) && (x <= 1.18e+225)))))
		tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
	else
		tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -9.5e+183], N[Not[Or[LessEqual[x, 6.8e-48], And[N[Not[LessEqual[x, 0.0205]], $MachinePrecision], LessEqual[x, 1.18e+225]]]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+183} \lor \neg \left(x \leq 6.8 \cdot 10^{-48} \lor \neg \left(x \leq 0.0205\right) \land x \leq 1.18 \cdot 10^{+225}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\

\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.5000000000000003e183 or 6.80000000000000056e-48 < x < 0.0205000000000000009 or 1.17999999999999992e225 < x

    1. Initial program 65.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. Simplified71.3%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 79.0%

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    5. Step-by-step derivation
      1. expm1-log1p-u59.1%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-udef57.1%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)} - 1\right)} - 4 \cdot i\right) \]
    6. Applied egg-rr57.1%

      \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)} - 1\right)} - 4 \cdot i\right) \]
    7. Step-by-step derivation
      1. expm1-def59.1%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-log1p79.0%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(t \cdot \left(y \cdot z\right)\right)} - 4 \cdot i\right) \]
      3. *-commutative79.0%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\right)} - 4 \cdot i\right) \]
      4. associate-*l*82.7%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(y \cdot \left(z \cdot t\right)\right)} - 4 \cdot i\right) \]
    8. Simplified82.7%

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

    if -9.5000000000000003e183 < x < 6.80000000000000056e-48 or 0.0205000000000000009 < x < 1.17999999999999992e225

    1. Initial program 92.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. Simplified93.7%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 75.4%

      \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right) + b \cdot c\right) - 27 \cdot \left(j \cdot k\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{+183} \lor \neg \left(x \leq 6.8 \cdot 10^{-48} \lor \neg \left(x \leq 0.0205\right) \land x \leq 1.18 \cdot 10^{+225}\right):\\ \;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 70.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;k \leq -2.6 \cdot 10^{-29}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\

\mathbf{elif}\;k \leq 2.9 \cdot 10^{+180}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\

\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < -2.6000000000000002e-29

    1. Initial program 83.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. Simplified85.5%

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

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

    if -2.6000000000000002e-29 < k < 2.90000000000000007e180

    1. Initial program 87.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. Simplified90.2%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in j around 0 78.9%

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

    if 2.90000000000000007e180 < k

    1. Initial program 92.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. Simplified92.8%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 89.8%

      \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right) + b \cdot c\right) - 27 \cdot \left(j \cdot k\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification74.2%

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

Alternative 13: 53.0% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -2.59999999999999998e-59 or 3.49999999999999969e128 < (*.f64 b c)

    1. Initial program 85.3%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified88.9%

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

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

    if -2.59999999999999998e-59 < (*.f64 b c) < -1.04999999999999998e-109

    1. Initial program 77.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. Simplified78.1%

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

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

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} \]
    7. Step-by-step derivation
      1. associate-*r*89.5%

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

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

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

    if -1.04999999999999998e-109 < (*.f64 b c) < 3.49999999999999969e128

    1. Initial program 89.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. Simplified92.3%

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. *-commutative61.2%

        \[\leadsto -4 \cdot \color{blue}{\left(t \cdot a\right)} + j \cdot \left(k \cdot -27\right) \]
    6. Simplified61.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -2.6 \cdot 10^{-59}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -1.05 \cdot 10^{-109}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 3.5 \cdot 10^{+128}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 54.8% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;b \cdot c \leq -8.5 \cdot 10^{-110}:\\
\;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -5.00000000000000005e54 or 2.40000000000000024e130 < (*.f64 b c)

    1. Initial program 83.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. Simplified88.0%

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

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

    if -5.00000000000000005e54 < (*.f64 b c) < -8.50000000000000029e-110

    1. Initial program 88.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. Simplified88.4%

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

      \[\leadsto \color{blue}{-4 \cdot \left(i \cdot x\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. associate-*r*79.5%

        \[\leadsto \color{blue}{\left(-4 \cdot i\right) \cdot x} + j \cdot \left(k \cdot -27\right) \]
      2. *-commutative79.5%

        \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} + j \cdot \left(k \cdot -27\right) \]
    6. Simplified79.5%

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

    if -8.50000000000000029e-110 < (*.f64 b c) < 2.40000000000000024e130

    1. Initial program 89.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. Simplified92.3%

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

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. *-commutative61.2%

        \[\leadsto -4 \cdot \color{blue}{\left(t \cdot a\right)} + j \cdot \left(k \cdot -27\right) \]
    6. Simplified61.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+54}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq -8.5 \cdot 10^{-110}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 2.4 \cdot 10^{+130}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 68.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+183}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\

\mathbf{elif}\;x \leq 5.4 \cdot 10^{-114}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\

\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\


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

    1. Initial program 67.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. Simplified76.1%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in x around inf 79.9%

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

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-udef66.5%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)} - 1\right)} - 4 \cdot i\right) \]
    6. Applied egg-rr66.5%

      \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)} - 1\right)} - 4 \cdot i\right) \]
    7. Step-by-step derivation
      1. expm1-def66.7%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(t \cdot \left(y \cdot z\right)\right)\right)} - 4 \cdot i\right) \]
      2. expm1-log1p79.9%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(t \cdot \left(y \cdot z\right)\right)} - 4 \cdot i\right) \]
      3. *-commutative79.9%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(\left(y \cdot z\right) \cdot t\right)} - 4 \cdot i\right) \]
      4. associate-*l*83.7%

        \[\leadsto x \cdot \left(18 \cdot \color{blue}{\left(y \cdot \left(z \cdot t\right)\right)} - 4 \cdot i\right) \]
    8. Simplified83.7%

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

    if -8.5000000000000004e183 < x < 5.3999999999999999e-114

    1. Initial program 93.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. Simplified92.3%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 78.0%

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

    if 5.3999999999999999e-114 < x

    1. Initial program 83.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. Simplified91.3%

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

      \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} + j \cdot \left(k \cdot -27\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification75.3%

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

Alternative 16: 35.2% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305} \lor \neg \left(b \cdot c \leq 3.95 \cdot 10^{+62}\right):\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= (* b c) -1.95e+305) (not (<= (* b c) 3.95e+62)))
   (* b c)
   (* -27.0 (* j k))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (((b * c) <= -1.95e+305) || !((b * c) <= 3.95e+62)) {
		tmp = b * c;
	} else {
		tmp = -27.0 * (j * k);
	}
	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 (((b * c) <= (-1.95d+305)) .or. (.not. ((b * c) <= 3.95d+62))) then
        tmp = b * c
    else
        tmp = (-27.0d0) * (j * k)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double tmp;
	if (((b * c) <= -1.95e+305) || !((b * c) <= 3.95e+62)) {
		tmp = b * c;
	} else {
		tmp = -27.0 * (j * k);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if ((b * c) <= -1.95e+305) or not ((b * c) <= 3.95e+62):
		tmp = b * c
	else:
		tmp = -27.0 * (j * k)
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((Float64(b * c) <= -1.95e+305) || !(Float64(b * c) <= 3.95e+62))
		tmp = Float64(b * c);
	else
		tmp = Float64(-27.0 * Float64(j * k));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if (((b * c) <= -1.95e+305) || ~(((b * c) <= 3.95e+62)))
		tmp = b * c;
	else
		tmp = -27.0 * (j * k);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.95e+305], N[Not[LessEqual[N[(b * c), $MachinePrecision], 3.95e+62]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305} \lor \neg \left(b \cdot c \leq 3.95 \cdot 10^{+62}\right):\\
\;\;\;\;b \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -1.95e305 or 3.9499999999999998e62 < (*.f64 b c)

    1. Initial program 83.1%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified87.3%

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

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

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

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

    if -1.95e305 < (*.f64 b c) < 3.9499999999999998e62

    1. Initial program 88.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. Simplified91.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305} \lor \neg \left(b \cdot c \leq 3.95 \cdot 10^{+62}\right):\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;-27 \cdot \left(j \cdot k\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 52.0% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.85 \cdot 10^{+113} \lor \neg \left(a \leq 6.6 \cdot 10^{+34}\right):\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= a -2.85e+113) (not (<= a 6.6e+34)))
   (+ (* b c) (* -4.0 (* t a)))
   (+ (* b c) (* 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 tmp;
	if ((a <= -2.85e+113) || !(a <= 6.6e+34)) {
		tmp = (b * c) + (-4.0 * (t * a));
	} else {
		tmp = (b * c) + (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) :: tmp
    if ((a <= (-2.85d+113)) .or. (.not. (a <= 6.6d+34))) then
        tmp = (b * c) + ((-4.0d0) * (t * a))
    else
        tmp = (b * c) + (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 tmp;
	if ((a <= -2.85e+113) || !(a <= 6.6e+34)) {
		tmp = (b * c) + (-4.0 * (t * a));
	} else {
		tmp = (b * c) + (j * (k * -27.0));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	tmp = 0
	if (a <= -2.85e+113) or not (a <= 6.6e+34):
		tmp = (b * c) + (-4.0 * (t * a))
	else:
		tmp = (b * c) + (j * (k * -27.0))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0
	if ((a <= -2.85e+113) || !(a <= 6.6e+34))
		tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a)));
	else
		tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	tmp = 0.0;
	if ((a <= -2.85e+113) || ~((a <= 6.6e+34)))
		tmp = (b * c) + (-4.0 * (t * a));
	else
		tmp = (b * c) + (j * (k * -27.0));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[a, -2.85e+113], N[Not[LessEqual[a, 6.6e+34]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.85 \cdot 10^{+113} \lor \neg \left(a \leq 6.6 \cdot 10^{+34}\right):\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.8499999999999999e113 or 6.59999999999999976e34 < a

    1. Initial program 82.7%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified86.3%

      \[\leadsto \color{blue}{\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)} \]
    3. Add Preprocessing
    4. Taylor expanded in x around 0 73.2%

      \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right) + b \cdot c\right) - 27 \cdot \left(j \cdot k\right)} \]
    5. Step-by-step derivation
      1. associate--l+73.2%

        \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right) + \left(b \cdot c - 27 \cdot \left(j \cdot k\right)\right)} \]
      2. *-commutative73.2%

        \[\leadsto -4 \cdot \color{blue}{\left(t \cdot a\right)} + \left(b \cdot c - 27 \cdot \left(j \cdot k\right)\right) \]
      3. associate-*r*73.2%

        \[\leadsto \color{blue}{\left(-4 \cdot t\right) \cdot a} + \left(b \cdot c - 27 \cdot \left(j \cdot k\right)\right) \]
      4. fma-def75.1%

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

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

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

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

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

    if -2.8499999999999999e113 < a < 6.59999999999999976e34

    1. Initial program 90.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. Simplified92.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.85 \cdot 10^{+113} \lor \neg \left(a \leq 6.6 \cdot 10^{+34}\right):\\ \;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 23.4% accurate, 10.3× speedup?

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

\\
b \cdot c
\end{array}
Derivation
  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. Simplified90.4%

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

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

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

    \[\leadsto \color{blue}{b \cdot c} \]
  7. Final simplification23.7%

    \[\leadsto b \cdot c \]
  8. Add Preprocessing

Developer target: 89.5% accurate, 0.8× 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 2024040 
(FPCore (x y z t a b c i j k)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, E"
  :precision binary64

  :herbie-target
  (if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))

  (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))