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

Percentage Accurate: 85.4% → 91.8%
Time: 20.0s
Alternatives: 19
Speedup: 0.9×

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 19 alternatives:

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

Initial Program: 85.4% 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.8% accurate, 0.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\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 #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0

    1. Initial program 97.8%

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

      \[\leadsto \left(\left(\left(\left(\color{blue}{\left(18 \cdot \left(x \cdot y\right)\right)} \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. associate-*r*97.8%

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

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

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

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

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

    1. Initial program 0.0%

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

      \[\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 67.8%

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

    \[\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(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(x \cdot \left(18 \cdot y\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 82.4% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+83}:\\
\;\;\;\;\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(i \cdot \left(x \cdot \left(-4\right)\right) - t \cdot \left(a \cdot 4 + z \cdot \left(x \cdot \left(y \cdot -18\right)\right)\right)\right) - t\_1\\


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

    1. Initial program 85.0%

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

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

    if -2.00000000000000007e139 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.00000000000000006e83

    1. Initial program 87.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. Simplified90.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 j around 0 89.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.00000000000000006e83 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    1. Initial program 81.2%

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

      \[\leadsto \left(\color{blue}{-1 \cdot \left(t \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right)\right)} - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. associate-*r*77.3%

        \[\leadsto \left(\color{blue}{\left(-1 \cdot t\right) \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right)} - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      2. neg-mul-177.3%

        \[\leadsto \left(\color{blue}{\left(-t\right)} \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. cancel-sign-sub-inv77.3%

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

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

        \[\leadsto \left(\left(-t\right) \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \color{blue}{a \cdot 4}\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      6. associate-*r*77.3%

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

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

      \[\leadsto \left(\left(-t\right) \cdot \left(\color{blue}{-18 \cdot \left(x \cdot \left(y \cdot z\right)\right)} + a \cdot 4\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    7. Step-by-step derivation
      1. associate-*r*77.3%

        \[\leadsto \left(\left(-t\right) \cdot \left(\color{blue}{\left(-18 \cdot x\right) \cdot \left(y \cdot z\right)} + a \cdot 4\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      2. *-commutative77.3%

        \[\leadsto \left(\left(-t\right) \cdot \left(\color{blue}{\left(x \cdot -18\right)} \cdot \left(y \cdot z\right) + a \cdot 4\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. associate-*l*81.5%

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

        \[\leadsto \left(\left(-t\right) \cdot \left(\color{blue}{z \cdot \left(\left(x \cdot -18\right) \cdot y\right)} + a \cdot 4\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      5. associate-*l*81.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(j \cdot 27\right) \cdot k \leq -2 \cdot 10^{+139}:\\ \;\;\;\;\left(\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{elif}\;\left(j \cdot 27\right) \cdot k \leq 2 \cdot 10^{+83}:\\ \;\;\;\;\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(i \cdot \left(x \cdot \left(-4\right)\right) - t \cdot \left(a \cdot 4 + z \cdot \left(x \cdot \left(y \cdot -18\right)\right)\right)\right) - \left(j \cdot 27\right) \cdot k\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 82.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+139} \lor \neg \left(t\_1 \leq 3.2 \cdot 10^{-31}\right):\\
\;\;\;\;\left(\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(x \cdot 4\right) \cdot i\right) - t\_1\\

\mathbf{else}:\\
\;\;\;\;\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)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.00000000000000007e139 or 3.20000000000000018e-31 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    1. Initial program 82.3%

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

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

    if -2.00000000000000007e139 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 3.20000000000000018e-31

    1. Initial program 88.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}{\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 89.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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification88.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(j \cdot 27\right) \cdot k \leq -2 \cdot 10^{+139} \lor \neg \left(\left(j \cdot 27\right) \cdot k \leq 3.2 \cdot 10^{-31}\right):\\ \;\;\;\;\left(\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \mathbf{else}:\\ \;\;\;\;\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)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 66.9% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+192}:\\ \;\;\;\;c \cdot \left(b + -4 \cdot \left(i \cdot \frac{x}{c}\right)\right)\\ \mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+99}:\\ \;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right) + t\_1\\ \mathbf{elif}\;b \cdot c \leq 10^{+58}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right) - \left(j \cdot 27\right) \cdot k\\ \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))))
   (if (<= (* b c) -2e+192)
     (* c (+ b (* -4.0 (* i (/ x c)))))
     (if (<= (* b c) -2e+99)
       (+ (* 18.0 (* (* y z) (* x t))) t_1)
       (if (<= (* b c) 1e+58)
         (- (* -4.0 (+ (* t a) (* x i))) (* (* j 27.0) k))
         (+ (* 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 tmp;
	if ((b * c) <= -2e+192) {
		tmp = c * (b + (-4.0 * (i * (x / c))));
	} else if ((b * c) <= -2e+99) {
		tmp = (18.0 * ((y * z) * (x * t))) + t_1;
	} else if ((b * c) <= 1e+58) {
		tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
	} 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) :: tmp
    t_1 = j * (k * (-27.0d0))
    if ((b * c) <= (-2d+192)) then
        tmp = c * (b + ((-4.0d0) * (i * (x / c))))
    else if ((b * c) <= (-2d+99)) then
        tmp = (18.0d0 * ((y * z) * (x * t))) + t_1
    else if ((b * c) <= 1d+58) then
        tmp = ((-4.0d0) * ((t * a) + (x * i))) - ((j * 27.0d0) * k)
    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 tmp;
	if ((b * c) <= -2e+192) {
		tmp = c * (b + (-4.0 * (i * (x / c))));
	} else if ((b * c) <= -2e+99) {
		tmp = (18.0 * ((y * z) * (x * t))) + t_1;
	} else if ((b * c) <= 1e+58) {
		tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
	} 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)
	tmp = 0
	if (b * c) <= -2e+192:
		tmp = c * (b + (-4.0 * (i * (x / c))))
	elif (b * c) <= -2e+99:
		tmp = (18.0 * ((y * z) * (x * t))) + t_1
	elif (b * c) <= 1e+58:
		tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k)
	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))
	tmp = 0.0
	if (Float64(b * c) <= -2e+192)
		tmp = Float64(c * Float64(b + Float64(-4.0 * Float64(i * Float64(x / c)))));
	elseif (Float64(b * c) <= -2e+99)
		tmp = Float64(Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))) + t_1);
	elseif (Float64(b * c) <= 1e+58)
		tmp = Float64(Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) - Float64(Float64(j * 27.0) * k));
	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);
	tmp = 0.0;
	if ((b * c) <= -2e+192)
		tmp = c * (b + (-4.0 * (i * (x / c))));
	elseif ((b * c) <= -2e+99)
		tmp = (18.0 * ((y * z) * (x * t))) + t_1;
	elseif ((b * c) <= 1e+58)
		tmp = (-4.0 * ((t * a) + (x * i))) - ((j * 27.0) * k);
	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]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+192], N[(c * N[(b + N[(-4.0 * N[(i * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e+99], N[(N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e+58], N[(N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $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)\\
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+192}:\\
\;\;\;\;c \cdot \left(b + -4 \cdot \left(i \cdot \frac{x}{c}\right)\right)\\

\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+99}:\\
\;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right) + t\_1\\

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

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


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

    1. Initial program 75.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. Simplified73.0%

      \[\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 t around 0 75.7%

      \[\leadsto \color{blue}{b \cdot c - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)} \]
    5. Taylor expanded in i around inf 78.4%

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

        \[\leadsto b \cdot c - \color{blue}{\left(4 \cdot i\right) \cdot x} \]
      2. *-commutative75.7%

        \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
    7. Simplified75.7%

      \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
    8. Taylor expanded in c around inf 78.4%

      \[\leadsto \color{blue}{c \cdot \left(b + -4 \cdot \frac{i \cdot x}{c}\right)} \]
    9. Step-by-step derivation
      1. associate-/l*81.1%

        \[\leadsto c \cdot \left(b + -4 \cdot \color{blue}{\left(i \cdot \frac{x}{c}\right)}\right) \]
    10. Simplified81.1%

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

    if -2.00000000000000008e192 < (*.f64 b c) < -1.9999999999999999e99

    1. Initial program 93.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.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 y around inf 75.1%

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} + j \cdot \left(k \cdot -27\right) \]
    5. Step-by-step derivation
      1. associate-*r*81.4%

        \[\leadsto 18 \cdot \color{blue}{\left(\left(t \cdot x\right) \cdot \left(y \cdot z\right)\right)} + j \cdot \left(k \cdot -27\right) \]
    6. Simplified81.4%

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

    if -1.9999999999999999e99 < (*.f64 b c) < 9.99999999999999944e57

    1. Initial program 90.7%

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

      \[\leadsto \left(\color{blue}{-1 \cdot \left(t \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right)\right)} - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. associate-*r*84.4%

        \[\leadsto \left(\color{blue}{\left(-1 \cdot t\right) \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right)} - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      2. neg-mul-184.4%

        \[\leadsto \left(\color{blue}{\left(-t\right)} \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. cancel-sign-sub-inv84.4%

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

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

        \[\leadsto \left(\left(-t\right) \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \color{blue}{a \cdot 4}\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      6. associate-*r*84.4%

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

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

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

        \[\leadsto \left(-4 \cdot \color{blue}{\left(t \cdot a\right)} - 4 \cdot \left(i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
      2. associate-*l*71.1%

        \[\leadsto \left(\color{blue}{\left(-4 \cdot t\right) \cdot a} - 4 \cdot \left(i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
      3. associate-*r*71.1%

        \[\leadsto \left(\left(-4 \cdot t\right) \cdot a - \color{blue}{\left(4 \cdot i\right) \cdot x}\right) - \left(j \cdot 27\right) \cdot k \]
      4. *-commutative71.1%

        \[\leadsto \left(\left(-4 \cdot t\right) \cdot a - \color{blue}{x \cdot \left(4 \cdot i\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      5. sub-neg71.1%

        \[\leadsto \color{blue}{\left(\left(-4 \cdot t\right) \cdot a + \left(-x \cdot \left(4 \cdot i\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      6. associate-*l*71.1%

        \[\leadsto \left(\color{blue}{-4 \cdot \left(t \cdot a\right)} + \left(-x \cdot \left(4 \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      7. *-commutative71.1%

        \[\leadsto \left(-4 \cdot \color{blue}{\left(a \cdot t\right)} + \left(-x \cdot \left(4 \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      8. metadata-eval71.1%

        \[\leadsto \left(\color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right) + \left(-x \cdot \left(4 \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      9. distribute-lft-neg-in71.1%

        \[\leadsto \left(\color{blue}{\left(-4 \cdot \left(a \cdot t\right)\right)} + \left(-x \cdot \left(4 \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      10. distribute-neg-in71.1%

        \[\leadsto \color{blue}{\left(-\left(4 \cdot \left(a \cdot t\right) + x \cdot \left(4 \cdot i\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      11. *-commutative71.1%

        \[\leadsto \left(-\left(4 \cdot \left(a \cdot t\right) + \color{blue}{\left(4 \cdot i\right) \cdot x}\right)\right) - \left(j \cdot 27\right) \cdot k \]
      12. associate-*r*71.1%

        \[\leadsto \left(-\left(4 \cdot \left(a \cdot t\right) + \color{blue}{4 \cdot \left(i \cdot x\right)}\right)\right) - \left(j \cdot 27\right) \cdot k \]
      13. distribute-lft-out71.1%

        \[\leadsto \left(-\color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      14. distribute-lft-neg-in71.1%

        \[\leadsto \color{blue}{\left(-4\right) \cdot \left(a \cdot t + i \cdot x\right)} - \left(j \cdot 27\right) \cdot k \]
      15. metadata-eval71.1%

        \[\leadsto \color{blue}{-4} \cdot \left(a \cdot t + i \cdot x\right) - \left(j \cdot 27\right) \cdot k \]
      16. *-commutative71.1%

        \[\leadsto -4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right) - \left(j \cdot 27\right) \cdot k \]
      17. *-commutative71.1%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{x \cdot i}\right) - \left(j \cdot 27\right) \cdot k \]
    8. Simplified71.1%

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

    if 9.99999999999999944e57 < (*.f64 b c)

    1. Initial program 76.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. Simplified86.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 66.0%

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

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

Alternative 5: 46.2% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;k \leq 2.25 \cdot 10^{-145}:\\
\;\;\;\;18 \cdot \left(x \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\

\mathbf{elif}\;k \leq 3.8:\\
\;\;\;\;c \cdot \left(b + -4 \cdot \left(i \cdot \frac{x}{c}\right)\right)\\

\mathbf{elif}\;k \leq 4.05 \cdot 10^{+102}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if k < -6.5e-139 or 4.05000000000000019e102 < k

    1. Initial program 85.8%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. 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 b around inf 56.0%

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

    if -6.5e-139 < k < -3.29999999999999982e-305

    1. Initial program 90.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified95.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 t around 0 53.8%

      \[\leadsto \color{blue}{b \cdot c - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)} \]
    5. Taylor expanded in i around inf 53.8%

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

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

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

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

    if -3.29999999999999982e-305 < k < 2.25e-145

    1. Initial program 81.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. Simplified85.4%

      \[\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 45.9%

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    5. Taylor expanded in t around inf 31.3%

      \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*34.8%

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

      \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(\left(t \cdot y\right) \cdot z\right)\right)} \]
    8. Taylor expanded in x around 0 27.8%

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*r*31.3%

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

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

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

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

        \[\leadsto \left(18 \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot z\right)}\right) \cdot x \]
      6. *-commutative34.8%

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

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

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

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

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

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

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

    if 2.25e-145 < k < 3.7999999999999998

    1. Initial program 78.5%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified78.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
    4. Taylor expanded in t around 0 58.0%

      \[\leadsto \color{blue}{b \cdot c - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)} \]
    5. Taylor expanded in i around inf 54.7%

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

        \[\leadsto b \cdot c - \color{blue}{\left(4 \cdot i\right) \cdot x} \]
      2. *-commutative54.7%

        \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
    7. Simplified54.7%

      \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
    8. Taylor expanded in c around inf 51.5%

      \[\leadsto \color{blue}{c \cdot \left(b + -4 \cdot \frac{i \cdot x}{c}\right)} \]
    9. Step-by-step derivation
      1. associate-/l*58.5%

        \[\leadsto c \cdot \left(b + -4 \cdot \color{blue}{\left(i \cdot \frac{x}{c}\right)}\right) \]
    10. Simplified58.5%

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

    if 3.7999999999999998 < k < 4.05000000000000019e102

    1. Initial program 92.6%

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

      \[\leadsto \left(\color{blue}{-1 \cdot \left(t \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right)\right)} - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. associate-*r*79.6%

        \[\leadsto \left(\color{blue}{\left(-1 \cdot t\right) \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right)} - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      2. neg-mul-179.6%

        \[\leadsto \left(\color{blue}{\left(-t\right)} \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. cancel-sign-sub-inv79.6%

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

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

        \[\leadsto \left(\left(-t\right) \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \color{blue}{a \cdot 4}\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      6. associate-*r*79.6%

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

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

      \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    7. Step-by-step derivation
      1. *-commutative78.3%

        \[\leadsto \left(-4 \cdot \color{blue}{\left(t \cdot a\right)} - 4 \cdot \left(i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
      2. associate-*l*78.3%

        \[\leadsto \left(\color{blue}{\left(-4 \cdot t\right) \cdot a} - 4 \cdot \left(i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
      3. associate-*r*78.3%

        \[\leadsto \left(\left(-4 \cdot t\right) \cdot a - \color{blue}{\left(4 \cdot i\right) \cdot x}\right) - \left(j \cdot 27\right) \cdot k \]
      4. *-commutative78.3%

        \[\leadsto \left(\left(-4 \cdot t\right) \cdot a - \color{blue}{x \cdot \left(4 \cdot i\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      5. sub-neg78.3%

        \[\leadsto \color{blue}{\left(\left(-4 \cdot t\right) \cdot a + \left(-x \cdot \left(4 \cdot i\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      6. associate-*l*78.3%

        \[\leadsto \left(\color{blue}{-4 \cdot \left(t \cdot a\right)} + \left(-x \cdot \left(4 \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      7. *-commutative78.3%

        \[\leadsto \left(-4 \cdot \color{blue}{\left(a \cdot t\right)} + \left(-x \cdot \left(4 \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      8. metadata-eval78.3%

        \[\leadsto \left(\color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right) + \left(-x \cdot \left(4 \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      9. distribute-lft-neg-in78.3%

        \[\leadsto \left(\color{blue}{\left(-4 \cdot \left(a \cdot t\right)\right)} + \left(-x \cdot \left(4 \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      10. distribute-neg-in78.3%

        \[\leadsto \color{blue}{\left(-\left(4 \cdot \left(a \cdot t\right) + x \cdot \left(4 \cdot i\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      11. *-commutative78.3%

        \[\leadsto \left(-\left(4 \cdot \left(a \cdot t\right) + \color{blue}{\left(4 \cdot i\right) \cdot x}\right)\right) - \left(j \cdot 27\right) \cdot k \]
      12. associate-*r*78.3%

        \[\leadsto \left(-\left(4 \cdot \left(a \cdot t\right) + \color{blue}{4 \cdot \left(i \cdot x\right)}\right)\right) - \left(j \cdot 27\right) \cdot k \]
      13. distribute-lft-out78.3%

        \[\leadsto \left(-\color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      14. distribute-lft-neg-in78.3%

        \[\leadsto \color{blue}{\left(-4\right) \cdot \left(a \cdot t + i \cdot x\right)} - \left(j \cdot 27\right) \cdot k \]
      15. metadata-eval78.3%

        \[\leadsto \color{blue}{-4} \cdot \left(a \cdot t + i \cdot x\right) - \left(j \cdot 27\right) \cdot k \]
      16. *-commutative78.3%

        \[\leadsto -4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right) - \left(j \cdot 27\right) \cdot k \]
      17. *-commutative78.3%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{x \cdot i}\right) - \left(j \cdot 27\right) \cdot k \]
    8. Simplified78.3%

      \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} - \left(j \cdot 27\right) \cdot k \]
    9. Taylor expanded in j around 0 60.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -6.5 \cdot 10^{-139}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;k \leq -3.3 \cdot 10^{-305}:\\ \;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\ \mathbf{elif}\;k \leq 2.25 \cdot 10^{-145}:\\ \;\;\;\;18 \cdot \left(x \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\ \mathbf{elif}\;k \leq 3.8:\\ \;\;\;\;c \cdot \left(b + -4 \cdot \left(i \cdot \frac{x}{c}\right)\right)\\ \mathbf{elif}\;k \leq 4.05 \cdot 10^{+102}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 87.0% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 3.5e59

    1. Initial program 87.2%

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

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

    if 3.5e59 < t

    1. Initial program 80.0%

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

      \[\leadsto \left(\color{blue}{-1 \cdot \left(t \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right)\right)} - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. associate-*r*83.5%

        \[\leadsto \left(\color{blue}{\left(-1 \cdot t\right) \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right)} - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      2. neg-mul-183.5%

        \[\leadsto \left(\color{blue}{\left(-t\right)} \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. cancel-sign-sub-inv83.5%

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

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

        \[\leadsto \left(\left(-t\right) \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \color{blue}{a \cdot 4}\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      6. associate-*r*83.5%

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

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

      \[\leadsto \left(\left(-t\right) \cdot \left(\color{blue}{-18 \cdot \left(x \cdot \left(y \cdot z\right)\right)} + a \cdot 4\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    7. Step-by-step derivation
      1. associate-*r*83.5%

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

        \[\leadsto \left(\left(-t\right) \cdot \left(\color{blue}{\left(x \cdot -18\right)} \cdot \left(y \cdot z\right) + a \cdot 4\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. associate-*l*87.8%

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

        \[\leadsto \left(\left(-t\right) \cdot \left(\color{blue}{z \cdot \left(\left(x \cdot -18\right) \cdot y\right)} + a \cdot 4\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      5. associate-*l*87.8%

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

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

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

Alternative 7: 78.0% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 73.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified81.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 84.3%

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

    if -9.4999999999999996e123 < x < 6.00000000000000005e66

    1. Initial program 91.2%

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

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

    if 6.00000000000000005e66 < x

    1. Initial program 76.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. Simplified84.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 74.5%

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    5. Taylor expanded in y around inf 76.6%

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

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

Alternative 8: 52.9% accurate, 1.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;c \cdot \left(b + -4 \cdot \left(i \cdot \frac{x}{c}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.99999999999999991e68 or 4.00000000000000008e95 < (*.f64 (*.f64 j #s(literal 27 binary64)) k)

    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. Simplified82.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 71.4%

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

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

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

    if -1.99999999999999991e68 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.00000000000000008e95

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

      \[\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 t around 0 56.6%

      \[\leadsto \color{blue}{b \cdot c - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)} \]
    5. Taylor expanded in i around inf 55.4%

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

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

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

      \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
    8. Taylor expanded in c around inf 53.6%

      \[\leadsto \color{blue}{c \cdot \left(b + -4 \cdot \frac{i \cdot x}{c}\right)} \]
    9. Step-by-step derivation
      1. associate-/l*56.7%

        \[\leadsto c \cdot \left(b + -4 \cdot \color{blue}{\left(i \cdot \frac{x}{c}\right)}\right) \]
    10. Simplified56.7%

      \[\leadsto \color{blue}{c \cdot \left(b + -4 \cdot \left(i \cdot \frac{x}{c}\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(j \cdot 27\right) \cdot k \leq -2 \cdot 10^{+68} \lor \neg \left(\left(j \cdot 27\right) \cdot k \leq 4 \cdot 10^{+95}\right):\\ \;\;\;\;\left(t \cdot a\right) \cdot -4 + j \cdot \left(k \cdot -27\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(b + -4 \cdot \left(i \cdot \frac{x}{c}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 72.7% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{+119} \lor \neg \left(t \leq 5.2 \cdot 10^{+120}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.2e119 or 5.1999999999999998e120 < t

    1. Initial program 76.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. Simplified77.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 t around inf 75.1%

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

    if -5.2e119 < t < 5.1999999999999998e120

    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 t around 0 76.2%

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

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

Alternative 10: 71.7% accurate, 1.2× speedup?

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

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

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

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


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

    1. Initial program 72.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. Simplified81.0%

      \[\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.1%

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

    if -3.4000000000000002e87 < x < 9e65

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

      \[\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 79.7%

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

    if 9e65 < x

    1. Initial program 76.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. Simplified84.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 74.5%

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    5. Taylor expanded in y around inf 76.6%

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

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

Alternative 11: 59.6% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;x \leq 9.6 \cdot 10^{-11}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\

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


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

    1. Initial program 75.6%

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

      \[\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 72.6%

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

    if -1.40000000000000006e48 < x < 9.6000000000000005e-11

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

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

    if 9.6000000000000005e-11 < x

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

      \[\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 66.1%

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    5. Taylor expanded in y around inf 67.7%

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

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

Alternative 12: 59.7% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.1 \cdot 10^{+49} \lor \neg \left(x \leq 1.05 \cdot 10^{+55}\right):\\ \;\;\;\;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} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (if (or (<= x -3.1e+49) (not (<= x 1.05e+55)))
   (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
   (+ (* 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 ((x <= -3.1e+49) || !(x <= 1.05e+55)) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} 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 ((x <= (-3.1d+49)) .or. (.not. (x <= 1.05d+55))) then
        tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
    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 ((x <= -3.1e+49) || !(x <= 1.05e+55)) {
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	} 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 (x <= -3.1e+49) or not (x <= 1.05e+55):
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i))
	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 ((x <= -3.1e+49) || !(x <= 1.05e+55))
		tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i)));
	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 ((x <= -3.1e+49) || ~((x <= 1.05e+55)))
		tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
	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[x, -3.1e+49], N[Not[LessEqual[x, 1.05e+55]], $MachinePrecision]], 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] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.1 \cdot 10^{+49} \lor \neg \left(x \leq 1.05 \cdot 10^{+55}\right):\\
\;\;\;\;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}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -3.09999999999999992e49 or 1.05e55 < x

    1. Initial program 75.6%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified83.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 72.3%

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

    if -3.09999999999999992e49 < x < 1.05e55

    1. Initial program 93.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. Simplified89.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 b around inf 62.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.1 \cdot 10^{+49} \lor \neg \left(x \leq 1.05 \cdot 10^{+55}\right):\\ \;\;\;\;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 13: 59.2% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+119} \lor \neg \left(t \leq 2000000000000\right):\\ \;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\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 (<= t -3e+119) (not (<= t 2000000000000.0)))
   (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
   (+ (* 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 ((t <= -3e+119) || !(t <= 2000000000000.0)) {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	} 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 ((t <= (-3d+119)) .or. (.not. (t <= 2000000000000.0d0))) then
        tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
    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 ((t <= -3e+119) || !(t <= 2000000000000.0)) {
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	} 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 (t <= -3e+119) or not (t <= 2000000000000.0):
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0))
	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 ((t <= -3e+119) || !(t <= 2000000000000.0))
		tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)));
	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 ((t <= -3e+119) || ~((t <= 2000000000000.0)))
		tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
	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[t, -3e+119], N[Not[LessEqual[t, 2000000000000.0]], $MachinePrecision]], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $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}\;t \leq -3 \cdot 10^{+119} \lor \neg \left(t \leq 2000000000000\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\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 t < -3.00000000000000001e119 or 2e12 < t

    1. Initial program 78.5%

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

      \[\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 t around inf 71.1%

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

    if -3.00000000000000001e119 < t < 2e12

    1. Initial program 90.2%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified91.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 60.5%

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

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

Alternative 14: 48.2% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -7.5 \cdot 10^{+235} \lor \neg \left(b \cdot c \leq 5.6 \cdot 10^{+31}\right):\\
\;\;\;\;b \cdot c\\

\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -7.4999999999999996e235 or 5.60000000000000034e31 < (*.f64 b c)

    1. Initial program 76.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. Simplified78.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 t around 0 75.5%

      \[\leadsto \color{blue}{b \cdot c - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)} \]
    5. Taylor expanded in i around inf 65.3%

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

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

        \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
    7. Simplified64.2%

      \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
    8. Taylor expanded in b around inf 61.7%

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

    if -7.4999999999999996e235 < (*.f64 b c) < 5.60000000000000034e31

    1. Initial program 90.6%

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

      \[\leadsto \left(\color{blue}{-1 \cdot \left(t \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right)\right)} - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. associate-*r*83.4%

        \[\leadsto \left(\color{blue}{\left(-1 \cdot t\right) \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right)} - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      2. neg-mul-183.4%

        \[\leadsto \left(\color{blue}{\left(-t\right)} \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. cancel-sign-sub-inv83.4%

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

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

        \[\leadsto \left(\left(-t\right) \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \color{blue}{a \cdot 4}\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      6. associate-*r*83.4%

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

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

      \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    7. Step-by-step derivation
      1. *-commutative68.3%

        \[\leadsto \left(-4 \cdot \color{blue}{\left(t \cdot a\right)} - 4 \cdot \left(i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
      2. associate-*l*68.3%

        \[\leadsto \left(\color{blue}{\left(-4 \cdot t\right) \cdot a} - 4 \cdot \left(i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
      3. associate-*r*68.3%

        \[\leadsto \left(\left(-4 \cdot t\right) \cdot a - \color{blue}{\left(4 \cdot i\right) \cdot x}\right) - \left(j \cdot 27\right) \cdot k \]
      4. *-commutative68.3%

        \[\leadsto \left(\left(-4 \cdot t\right) \cdot a - \color{blue}{x \cdot \left(4 \cdot i\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      5. sub-neg68.3%

        \[\leadsto \color{blue}{\left(\left(-4 \cdot t\right) \cdot a + \left(-x \cdot \left(4 \cdot i\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      6. associate-*l*68.3%

        \[\leadsto \left(\color{blue}{-4 \cdot \left(t \cdot a\right)} + \left(-x \cdot \left(4 \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      7. *-commutative68.3%

        \[\leadsto \left(-4 \cdot \color{blue}{\left(a \cdot t\right)} + \left(-x \cdot \left(4 \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      8. metadata-eval68.3%

        \[\leadsto \left(\color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right) + \left(-x \cdot \left(4 \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      9. distribute-lft-neg-in68.3%

        \[\leadsto \left(\color{blue}{\left(-4 \cdot \left(a \cdot t\right)\right)} + \left(-x \cdot \left(4 \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      10. distribute-neg-in68.3%

        \[\leadsto \color{blue}{\left(-\left(4 \cdot \left(a \cdot t\right) + x \cdot \left(4 \cdot i\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      11. *-commutative68.3%

        \[\leadsto \left(-\left(4 \cdot \left(a \cdot t\right) + \color{blue}{\left(4 \cdot i\right) \cdot x}\right)\right) - \left(j \cdot 27\right) \cdot k \]
      12. associate-*r*68.3%

        \[\leadsto \left(-\left(4 \cdot \left(a \cdot t\right) + \color{blue}{4 \cdot \left(i \cdot x\right)}\right)\right) - \left(j \cdot 27\right) \cdot k \]
      13. distribute-lft-out68.3%

        \[\leadsto \left(-\color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      14. distribute-lft-neg-in68.3%

        \[\leadsto \color{blue}{\left(-4\right) \cdot \left(a \cdot t + i \cdot x\right)} - \left(j \cdot 27\right) \cdot k \]
      15. metadata-eval68.3%

        \[\leadsto \color{blue}{-4} \cdot \left(a \cdot t + i \cdot x\right) - \left(j \cdot 27\right) \cdot k \]
      16. *-commutative68.3%

        \[\leadsto -4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right) - \left(j \cdot 27\right) \cdot k \]
      17. *-commutative68.3%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{x \cdot i}\right) - \left(j \cdot 27\right) \cdot k \]
    8. Simplified68.3%

      \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} - \left(j \cdot 27\right) \cdot k \]
    9. Taylor expanded in j around 0 45.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -7.5 \cdot 10^{+235} \lor \neg \left(b \cdot c \leq 5.6 \cdot 10^{+31}\right):\\ \;\;\;\;b \cdot c\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 31.2% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;k \leq -1.35 \cdot 10^{-103}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\

\mathbf{elif}\;k \leq 2.5 \cdot 10^{-39}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;k \leq 7.8 \cdot 10^{+108}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if k < -1.35000000000000005e-103

    1. Initial program 87.7%

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

      \[\leadsto \left(\color{blue}{-1 \cdot \left(t \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right)\right)} - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. associate-*r*78.0%

        \[\leadsto \left(\color{blue}{\left(-1 \cdot t\right) \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right)} - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      2. neg-mul-178.0%

        \[\leadsto \left(\color{blue}{\left(-t\right)} \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. cancel-sign-sub-inv78.0%

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

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

        \[\leadsto \left(\left(-t\right) \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \color{blue}{a \cdot 4}\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      6. associate-*r*78.0%

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

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

      \[\leadsto \color{blue}{\left(-27 \cdot \left(j \cdot k\right) + -1 \cdot \left(t \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + 4 \cdot a\right)\right)\right) - 4 \cdot \left(i \cdot x\right)} \]
    7. Taylor expanded in j around inf 39.2%

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

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

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

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

    if -1.35000000000000005e-103 < k < 2.4999999999999999e-39

    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. Simplified91.0%

      \[\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 t around 0 54.5%

      \[\leadsto \color{blue}{b \cdot c - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)} \]
    5. Taylor expanded in i around inf 52.5%

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

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

        \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
    7. Simplified52.5%

      \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
    8. Taylor expanded in b around inf 39.1%

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

    if 2.4999999999999999e-39 < k < 7.79999999999999969e108

    1. Initial program 80.0%

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

      \[\leadsto \left(\left(\left(\left(\color{blue}{\left(18 \cdot \left(x \cdot y\right)\right)} \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. associate-*r*80.0%

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

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

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

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

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

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

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

    if 7.79999999999999969e108 < k

    1. Initial program 82.9%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified80.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 50.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -1.35 \cdot 10^{-103}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;k \leq 2.5 \cdot 10^{-39}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 7.8 \cdot 10^{+108}:\\ \;\;\;\;\left(x \cdot i\right) \cdot -4\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 31.2% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;k \leq 1.35 \cdot 10^{-38}:\\
\;\;\;\;b \cdot c\\

\mathbf{elif}\;k \leq 7.8 \cdot 10^{+108}:\\
\;\;\;\;\left(x \cdot i\right) \cdot -4\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if k < -1.05000000000000002e-103 or 7.79999999999999969e108 < k

    1. Initial program 86.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.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 j around inf 43.0%

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

    if -1.05000000000000002e-103 < k < 1.35000000000000003e-38

    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. Simplified91.0%

      \[\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 t around 0 54.5%

      \[\leadsto \color{blue}{b \cdot c - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)} \]
    5. Taylor expanded in i around inf 52.5%

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

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

        \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
    7. Simplified52.5%

      \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
    8. Taylor expanded in b around inf 39.1%

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

    if 1.35000000000000003e-38 < k < 7.79999999999999969e108

    1. Initial program 80.0%

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

      \[\leadsto \left(\left(\left(\left(\color{blue}{\left(18 \cdot \left(x \cdot y\right)\right)} \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. associate-*r*80.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -1.05 \cdot 10^{-103}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \mathbf{elif}\;k \leq 1.35 \cdot 10^{-38}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;k \leq 7.8 \cdot 10^{+108}:\\ \;\;\;\;\left(x \cdot i\right) \cdot -4\\ \mathbf{else}:\\ \;\;\;\;\left(j \cdot k\right) \cdot -27\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 49.0% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;x \leq 95000000000:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\

\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\


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

    1. Initial program 72.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. Simplified81.0%

      \[\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.1%

      \[\leadsto \color{blue}{x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)} \]
    5. Taylor expanded in t around inf 52.0%

      \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*51.9%

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

      \[\leadsto x \cdot \color{blue}{\left(18 \cdot \left(\left(t \cdot y\right) \cdot z\right)\right)} \]
    8. Taylor expanded in x around 0 50.0%

      \[\leadsto \color{blue}{18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)} \]
    9. Step-by-step derivation
      1. associate-*r*50.0%

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

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

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

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

        \[\leadsto \left(18 \cdot \color{blue}{\left(\left(t \cdot y\right) \cdot z\right)}\right) \cdot x \]
      6. *-commutative51.9%

        \[\leadsto \left(18 \cdot \left(\color{blue}{\left(y \cdot t\right)} \cdot z\right)\right) \cdot x \]
      7. *-commutative51.9%

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

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

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

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

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

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

    if -7.0999999999999998e87 < x < 9.5e10

    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. Simplified89.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 61.5%

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

    if 9.5e10 < x

    1. Initial program 78.3%

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

      \[\leadsto \left(\color{blue}{-1 \cdot \left(t \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right)\right)} - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    4. Step-by-step derivation
      1. associate-*r*87.3%

        \[\leadsto \left(\color{blue}{\left(-1 \cdot t\right) \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right)} - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      2. neg-mul-187.3%

        \[\leadsto \left(\color{blue}{\left(-t\right)} \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - -4 \cdot a\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      3. cancel-sign-sub-inv87.3%

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

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

        \[\leadsto \left(\left(-t\right) \cdot \left(-18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + \color{blue}{a \cdot 4}\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
      6. associate-*r*87.3%

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

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

      \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right) - 4 \cdot \left(i \cdot x\right)\right)} - \left(j \cdot 27\right) \cdot k \]
    7. Step-by-step derivation
      1. *-commutative67.8%

        \[\leadsto \left(-4 \cdot \color{blue}{\left(t \cdot a\right)} - 4 \cdot \left(i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
      2. associate-*l*67.8%

        \[\leadsto \left(\color{blue}{\left(-4 \cdot t\right) \cdot a} - 4 \cdot \left(i \cdot x\right)\right) - \left(j \cdot 27\right) \cdot k \]
      3. associate-*r*67.8%

        \[\leadsto \left(\left(-4 \cdot t\right) \cdot a - \color{blue}{\left(4 \cdot i\right) \cdot x}\right) - \left(j \cdot 27\right) \cdot k \]
      4. *-commutative67.8%

        \[\leadsto \left(\left(-4 \cdot t\right) \cdot a - \color{blue}{x \cdot \left(4 \cdot i\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      5. sub-neg67.8%

        \[\leadsto \color{blue}{\left(\left(-4 \cdot t\right) \cdot a + \left(-x \cdot \left(4 \cdot i\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      6. associate-*l*67.8%

        \[\leadsto \left(\color{blue}{-4 \cdot \left(t \cdot a\right)} + \left(-x \cdot \left(4 \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      7. *-commutative67.8%

        \[\leadsto \left(-4 \cdot \color{blue}{\left(a \cdot t\right)} + \left(-x \cdot \left(4 \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      8. metadata-eval67.8%

        \[\leadsto \left(\color{blue}{\left(-4\right)} \cdot \left(a \cdot t\right) + \left(-x \cdot \left(4 \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      9. distribute-lft-neg-in67.8%

        \[\leadsto \left(\color{blue}{\left(-4 \cdot \left(a \cdot t\right)\right)} + \left(-x \cdot \left(4 \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k \]
      10. distribute-neg-in67.8%

        \[\leadsto \color{blue}{\left(-\left(4 \cdot \left(a \cdot t\right) + x \cdot \left(4 \cdot i\right)\right)\right)} - \left(j \cdot 27\right) \cdot k \]
      11. *-commutative67.8%

        \[\leadsto \left(-\left(4 \cdot \left(a \cdot t\right) + \color{blue}{\left(4 \cdot i\right) \cdot x}\right)\right) - \left(j \cdot 27\right) \cdot k \]
      12. associate-*r*67.8%

        \[\leadsto \left(-\left(4 \cdot \left(a \cdot t\right) + \color{blue}{4 \cdot \left(i \cdot x\right)}\right)\right) - \left(j \cdot 27\right) \cdot k \]
      13. distribute-lft-out67.8%

        \[\leadsto \left(-\color{blue}{4 \cdot \left(a \cdot t + i \cdot x\right)}\right) - \left(j \cdot 27\right) \cdot k \]
      14. distribute-lft-neg-in67.8%

        \[\leadsto \color{blue}{\left(-4\right) \cdot \left(a \cdot t + i \cdot x\right)} - \left(j \cdot 27\right) \cdot k \]
      15. metadata-eval67.8%

        \[\leadsto \color{blue}{-4} \cdot \left(a \cdot t + i \cdot x\right) - \left(j \cdot 27\right) \cdot k \]
      16. *-commutative67.8%

        \[\leadsto -4 \cdot \left(\color{blue}{t \cdot a} + i \cdot x\right) - \left(j \cdot 27\right) \cdot k \]
      17. *-commutative67.8%

        \[\leadsto -4 \cdot \left(t \cdot a + \color{blue}{x \cdot i}\right) - \left(j \cdot 27\right) \cdot k \]
    8. Simplified67.8%

      \[\leadsto \color{blue}{-4 \cdot \left(t \cdot a + x \cdot i\right)} - \left(j \cdot 27\right) \cdot k \]
    9. Taylor expanded in j around 0 54.2%

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

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

Alternative 18: 31.2% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;k \leq -1.35 \cdot 10^{-103} \lor \neg \left(k \leq 4.6 \cdot 10^{+109}\right):\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < -1.35000000000000005e-103 or 4.60000000000000021e109 < k

    1. Initial program 86.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.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 j around inf 43.0%

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

    if -1.35000000000000005e-103 < k < 4.60000000000000021e109

    1. Initial program 85.8%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Simplified87.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 t around 0 53.9%

      \[\leadsto \color{blue}{b \cdot c - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)} \]
    5. Taylor expanded in i around inf 48.8%

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

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

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

      \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
    8. Taylor expanded in b around inf 32.3%

      \[\leadsto \color{blue}{b \cdot c} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification37.4%

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

Alternative 19: 23.5% 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 85.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. Simplified86.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 t around 0 61.6%

    \[\leadsto \color{blue}{b \cdot c - \left(4 \cdot \left(i \cdot x\right) + 27 \cdot \left(j \cdot k\right)\right)} \]
  5. Taylor expanded in i around inf 42.1%

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

      \[\leadsto b \cdot c - \color{blue}{\left(4 \cdot i\right) \cdot x} \]
    2. *-commutative41.7%

      \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
  7. Simplified41.7%

    \[\leadsto b \cdot c - \color{blue}{x \cdot \left(4 \cdot i\right)} \]
  8. Taylor expanded in b around inf 26.6%

    \[\leadsto \color{blue}{b \cdot c} \]
  9. Add Preprocessing

Developer Target 1: 89.6% 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 2024137 
(FPCore (x y z t a b c i j k)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, E"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< t -8105407698770699/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))) (if (< t 8284013971902611/50000000000000) (+ (- (* (* 18 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4)) (- (* c b) (* 27 (* k j)))) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))))))

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