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

Percentage Accurate: 85.0% → 90.1%
Time: 28.2s
Alternatives: 24
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 24 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.0% 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: 90.1% accurate, 0.5× speedup?

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

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

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


\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 95.7%

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

      \[\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 +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. Simplified31.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 76.2%

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

    \[\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) - k \cdot \left(j \cdot 27\right) \leq \infty:\\ \;\;\;\;\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}:\\ \;\;\;\;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: 54.0% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;b \cdot c \leq -4.1 \cdot 10^{-10}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;b \cdot c \leq -1.18 \cdot 10^{-204}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;b \cdot c \leq 3.2 \cdot 10^{-39}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \cdot c \leq 1.75 \cdot 10^{+143}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 73.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. Simplified79.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 75.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 72.7%

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

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

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

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

    if -1.15e139 < (*.f64 b c) < -2.8999999999999998e47

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

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

      \[\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)} \]
    5. Taylor expanded in x around 0 74.2%

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

    if -2.8999999999999998e47 < (*.f64 b c) < -3.6e14

    1. Initial program 86.6%

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

      \[\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*85.6%

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

      \[\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 -3.6e14 < (*.f64 b c) < -4.0999999999999998e-10 or -2.9000000000000001e-44 < (*.f64 b c) < -1.17999999999999995e-204 or 3.5500000000000001e-68 < (*.f64 b c) < 3.1999999999999998e-39

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

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

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

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

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

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

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

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

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

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

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

    if -4.0999999999999998e-10 < (*.f64 b c) < -2.9000000000000001e-44 or -1.17999999999999995e-204 < (*.f64 b c) < 3.5500000000000001e-68 or 3.1999999999999998e-39 < (*.f64 b c) < 1.75000000000000004e143

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

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

    if 1.75000000000000004e143 < (*.f64 b c)

    1. Initial program 87.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.15 \cdot 10^{+139}:\\ \;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -2.9 \cdot 10^{+47}:\\ \;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\ \mathbf{elif}\;b \cdot c \leq -3.6 \cdot 10^{+14}:\\ \;\;\;\;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 -4.1 \cdot 10^{-10}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -2.9 \cdot 10^{-44}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -1.18 \cdot 10^{-204}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 3.55 \cdot 10^{-68}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 3.2 \cdot 10^{-39}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 1.75 \cdot 10^{+143}:\\ \;\;\;\;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 3: 53.6% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;b \cdot c \leq -22500000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \cdot c \leq -1.4 \cdot 10^{-204}:\\
\;\;\;\;t\_3\\

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

\mathbf{elif}\;b \cdot c \leq 1.4 \cdot 10^{-39}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;b \cdot c \leq 4.2 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 73.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. Simplified79.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 75.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 72.7%

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

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

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

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

    if -5.2000000000000002e140 < (*.f64 b c) < -1.17999999999999993e45

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

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

      \[\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)} \]
    5. Taylor expanded in x around 0 74.2%

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

    if -1.17999999999999993e45 < (*.f64 b c) < -2.25e13 or -1.4e-204 < (*.f64 b c) < 1.3000000000000001e-69 or 1.4000000000000001e-39 < (*.f64 b c) < 4.2000000000000003e149

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

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

    if -2.25e13 < (*.f64 b c) < -1.4e-204 or 1.3000000000000001e-69 < (*.f64 b c) < 1.4000000000000001e-39

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2000000000000003e149 < (*.f64 b c)

    1. Initial program 87.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -5.2 \cdot 10^{+140}:\\ \;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -1.18 \cdot 10^{+45}:\\ \;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\ \mathbf{elif}\;b \cdot c \leq -22500000000000:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -1.4 \cdot 10^{-204}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 1.3 \cdot 10^{-69}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 1.4 \cdot 10^{-39}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 4.2 \cdot 10^{+149}:\\ \;\;\;\;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 4: 79.9% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq -1.7 \cdot 10^{-84}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 3.4 \cdot 10^{-32}:\\
\;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - k \cdot \left(j \cdot 27\right)\\

\mathbf{elif}\;t \leq 1.9 \cdot 10^{+50}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.00000000000000024e140

    1. Initial program 72.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. Simplified83.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 j around 0 81.5%

      \[\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)} \]
    5. Taylor expanded in i around 0 84.2%

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

    if -4.00000000000000024e140 < t < -1.7000000000000001e-84 or 3.39999999999999978e-32 < t < 1.89999999999999994e50

    1. Initial program 94.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. Simplified90.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 y around 0 94.3%

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

    if -1.7000000000000001e-84 < t < 3.39999999999999978e-32

    1. Initial program 87.9%

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

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

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

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

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

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

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

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

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

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

    if 1.89999999999999994e50 < t

    1. Initial program 79.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.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 j around 0 85.7%

      \[\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 4 regimes into one program.
  4. Final simplification89.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{+140}:\\ \;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq -1.7 \cdot 10^{-84}:\\ \;\;\;\;\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-32}:\\ \;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+50}:\\ \;\;\;\;\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\ \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 5: 81.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
t_2 := b \cdot c + t\_1\\
t_3 := t\_2 - t \cdot \left(a \cdot 4\right)\\
\mathbf{if}\;x \leq -9.8 \cdot 10^{+122}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq -1.15 \cdot 10^{+64}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;x \leq -1.4 \cdot 10^{-25}:\\
\;\;\;\;t\_2 - k \cdot \left(j \cdot 27\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -9.7999999999999995e122

    1. Initial program 60.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. Simplified71.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 86.9%

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

    if -9.7999999999999995e122 < x < -1.15e64 or 3.70000000000000016e30 < x

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

      \[\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)} \]
    4. Taylor expanded in a around inf 94.2%

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

      \[\leadsto \left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - \color{blue}{4 \cdot \left(a \cdot t\right)} \]
    6. Step-by-step derivation
      1. *-commutative92.9%

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

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

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

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

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

    if -1.15e64 < x < -1.39999999999999994e-25

    1. Initial program 91.1%

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

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

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

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

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

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

        \[\leadsto \left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - \color{blue}{k \cdot \left(--27 \cdot j\right)} \]
      6. distribute-lft-neg-in95.4%

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

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

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

    if -1.39999999999999994e-25 < x < 3.70000000000000016e30

    1. Initial program 95.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. Simplified95.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 y around 0 88.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.8 \cdot 10^{+122}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{elif}\;x \leq -1.15 \cdot 10^{+64}:\\ \;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - t \cdot \left(a \cdot 4\right)\\ \mathbf{elif}\;x \leq -1.4 \cdot 10^{-25}:\\ \;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - k \cdot \left(j \cdot 27\right)\\ \mathbf{elif}\;x \leq 3.7 \cdot 10^{+30}:\\ \;\;\;\;\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - t \cdot \left(a \cdot 4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 53.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := j \cdot \left(k \cdot -27\right)\\ \mathbf{if}\;b \cdot c \leq -1.35 \cdot 10^{+144}:\\ \;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -7.5 \cdot 10^{-216}:\\ \;\;\;\;t\_1 + t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -4 \cdot 10^{-313}:\\ \;\;\;\;t\_1 + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 1.36 \cdot 10^{+88}:\\ \;\;\;\;j \cdot \left(k \cdot -27 + -4 \cdot \frac{t \cdot a}{j}\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (* j (* k -27.0))))
   (if (<= (* b c) -1.35e+144)
     (- (* b c) (* x (* 4.0 i)))
     (if (<= (* b c) -7.5e-216)
       (+ t_1 (* t (* a -4.0)))
       (if (<= (* b c) -4e-313)
         (+ t_1 (* -4.0 (* x i)))
         (if (<= (* b c) 1.36e+88)
           (* j (+ (* k -27.0) (* -4.0 (/ (* t a) j))))
           (+ (* 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) <= -1.35e+144) {
		tmp = (b * c) - (x * (4.0 * i));
	} else if ((b * c) <= -7.5e-216) {
		tmp = t_1 + (t * (a * -4.0));
	} else if ((b * c) <= -4e-313) {
		tmp = t_1 + (-4.0 * (x * i));
	} else if ((b * c) <= 1.36e+88) {
		tmp = j * ((k * -27.0) + (-4.0 * ((t * a) / j)));
	} 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) <= (-1.35d+144)) then
        tmp = (b * c) - (x * (4.0d0 * i))
    else if ((b * c) <= (-7.5d-216)) then
        tmp = t_1 + (t * (a * (-4.0d0)))
    else if ((b * c) <= (-4d-313)) then
        tmp = t_1 + ((-4.0d0) * (x * i))
    else if ((b * c) <= 1.36d+88) then
        tmp = j * ((k * (-27.0d0)) + ((-4.0d0) * ((t * a) / j)))
    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) <= -1.35e+144) {
		tmp = (b * c) - (x * (4.0 * i));
	} else if ((b * c) <= -7.5e-216) {
		tmp = t_1 + (t * (a * -4.0));
	} else if ((b * c) <= -4e-313) {
		tmp = t_1 + (-4.0 * (x * i));
	} else if ((b * c) <= 1.36e+88) {
		tmp = j * ((k * -27.0) + (-4.0 * ((t * a) / j)));
	} 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) <= -1.35e+144:
		tmp = (b * c) - (x * (4.0 * i))
	elif (b * c) <= -7.5e-216:
		tmp = t_1 + (t * (a * -4.0))
	elif (b * c) <= -4e-313:
		tmp = t_1 + (-4.0 * (x * i))
	elif (b * c) <= 1.36e+88:
		tmp = j * ((k * -27.0) + (-4.0 * ((t * a) / j)))
	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) <= -1.35e+144)
		tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i)));
	elseif (Float64(b * c) <= -7.5e-216)
		tmp = Float64(t_1 + Float64(t * Float64(a * -4.0)));
	elseif (Float64(b * c) <= -4e-313)
		tmp = Float64(t_1 + Float64(-4.0 * Float64(x * i)));
	elseif (Float64(b * c) <= 1.36e+88)
		tmp = Float64(j * Float64(Float64(k * -27.0) + Float64(-4.0 * Float64(Float64(t * a) / j))));
	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) <= -1.35e+144)
		tmp = (b * c) - (x * (4.0 * i));
	elseif ((b * c) <= -7.5e-216)
		tmp = t_1 + (t * (a * -4.0));
	elseif ((b * c) <= -4e-313)
		tmp = t_1 + (-4.0 * (x * i));
	elseif ((b * c) <= 1.36e+88)
		tmp = j * ((k * -27.0) + (-4.0 * ((t * a) / j)));
	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], -1.35e+144], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -7.5e-216], N[(t$95$1 + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -4e-313], N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.36e+88], N[(j * N[(N[(k * -27.0), $MachinePrecision] + N[(-4.0 * N[(N[(t * a), $MachinePrecision] / j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}

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

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

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

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

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


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

    1. Initial program 73.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. Simplified79.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 75.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 72.7%

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

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

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

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

    if -1.35000000000000008e144 < (*.f64 b c) < -7.50000000000000064e-216

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.50000000000000064e-216 < (*.f64 b c) < -4.0000000000037e-313

    1. Initial program 92.3%

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

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

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

    if -4.0000000000037e-313 < (*.f64 b c) < 1.3600000000000001e88

    1. Initial program 87.0%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(-4 \cdot a\right)} + j \cdot \left(k \cdot -27\right) \]
    7. Taylor expanded in j around inf 49.5%

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

    if 1.3600000000000001e88 < (*.f64 b c)

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.35 \cdot 10^{+144}:\\ \;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq -7.5 \cdot 10^{-216}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq -4 \cdot 10^{-313}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\ \mathbf{elif}\;b \cdot c \leq 1.36 \cdot 10^{+88}:\\ \;\;\;\;j \cdot \left(k \cdot -27 + -4 \cdot \frac{t \cdot a}{j}\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 33.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \left(t \cdot a\right) \cdot -4\\
t_2 := x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -1.25 \cdot 10^{+261}:\\
\;\;\;\;b \cdot c\\

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

\mathbf{elif}\;b \cdot c \leq 0:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;b \cdot c \leq 5.8 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -1.25e261 or 1.3999999999999999e139 < (*.f64 b c)

    1. Initial program 82.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 88.0%

      \[\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)} \]
    4. Taylor expanded in b around inf 76.0%

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

    if -1.25e261 < (*.f64 b c) < -7.00000000000000022e-219 or -0.0 < (*.f64 b c) < 5.7999999999999999e88

    1. Initial program 86.7%

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

      \[\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)} \]
    4. Taylor expanded in a around inf 35.1%

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

        \[\leadsto \color{blue}{\left(a \cdot t\right) \cdot -4} \]
      2. *-commutative35.1%

        \[\leadsto \color{blue}{\left(t \cdot a\right)} \cdot -4 \]
    6. Simplified35.1%

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

    if -7.00000000000000022e-219 < (*.f64 b c) < -0.0 or 5.7999999999999999e88 < (*.f64 b c) < 1.3999999999999999e139

    1. Initial program 83.2%

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

      \[\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)} \]
    4. Taylor expanded in i around inf 37.6%

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

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

        \[\leadsto \left(\color{blue}{\left(-4\right)} \cdot i\right) \cdot x \]
      3. distribute-lft-neg-in37.6%

        \[\leadsto \color{blue}{\left(-4 \cdot i\right)} \cdot x \]
      4. distribute-lft-neg-in37.6%

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

        \[\leadsto -\color{blue}{x \cdot \left(4 \cdot i\right)} \]
      6. distribute-rgt-neg-in37.6%

        \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} \]
      7. distribute-lft-neg-in37.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.25 \cdot 10^{+261}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -7 \cdot 10^{-219}:\\ \;\;\;\;\left(t \cdot a\right) \cdot -4\\ \mathbf{elif}\;b \cdot c \leq 0:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 5.8 \cdot 10^{+88}:\\ \;\;\;\;\left(t \cdot a\right) \cdot -4\\ \mathbf{elif}\;b \cdot c \leq 1.4 \cdot 10^{+139}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 50.4% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot c - x \cdot \left(4 \cdot i\right)\\ t_2 := j \cdot \left(k \cdot -27\right)\\ t_3 := t\_2 + t \cdot \left(a \cdot -4\right)\\ \mathbf{if}\;t \leq -3.1 \cdot 10^{+153}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{+97}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-120}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-208}:\\ \;\;\;\;b \cdot c + t\_2\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{+76}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (- (* b c) (* x (* 4.0 i))))
        (t_2 (* j (* k -27.0)))
        (t_3 (+ t_2 (* t (* a -4.0)))))
   (if (<= t -3.1e+153)
     (* x (* 18.0 (* z (* y t))))
     (if (<= t -5.2e+97)
       t_3
       (if (<= t -1.1e-120)
         t_1
         (if (<= t 1.8e-208) (+ (* b c) t_2) (if (<= t 5.4e+76) t_1 t_3)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (b * c) - (x * (4.0 * i));
	double t_2 = j * (k * -27.0);
	double t_3 = t_2 + (t * (a * -4.0));
	double tmp;
	if (t <= -3.1e+153) {
		tmp = x * (18.0 * (z * (y * t)));
	} else if (t <= -5.2e+97) {
		tmp = t_3;
	} else if (t <= -1.1e-120) {
		tmp = t_1;
	} else if (t <= 1.8e-208) {
		tmp = (b * c) + t_2;
	} else if (t <= 5.4e+76) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8), intent (in) :: i
    real(8), intent (in) :: j
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = (b * c) - (x * (4.0d0 * i))
    t_2 = j * (k * (-27.0d0))
    t_3 = t_2 + (t * (a * (-4.0d0)))
    if (t <= (-3.1d+153)) then
        tmp = x * (18.0d0 * (z * (y * t)))
    else if (t <= (-5.2d+97)) then
        tmp = t_3
    else if (t <= (-1.1d-120)) then
        tmp = t_1
    else if (t <= 1.8d-208) then
        tmp = (b * c) + t_2
    else if (t <= 5.4d+76) then
        tmp = t_1
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (b * c) - (x * (4.0 * i));
	double t_2 = j * (k * -27.0);
	double t_3 = t_2 + (t * (a * -4.0));
	double tmp;
	if (t <= -3.1e+153) {
		tmp = x * (18.0 * (z * (y * t)));
	} else if (t <= -5.2e+97) {
		tmp = t_3;
	} else if (t <= -1.1e-120) {
		tmp = t_1;
	} else if (t <= 1.8e-208) {
		tmp = (b * c) + t_2;
	} else if (t <= 5.4e+76) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (b * c) - (x * (4.0 * i))
	t_2 = j * (k * -27.0)
	t_3 = t_2 + (t * (a * -4.0))
	tmp = 0
	if t <= -3.1e+153:
		tmp = x * (18.0 * (z * (y * t)))
	elif t <= -5.2e+97:
		tmp = t_3
	elif t <= -1.1e-120:
		tmp = t_1
	elif t <= 1.8e-208:
		tmp = (b * c) + t_2
	elif t <= 5.4e+76:
		tmp = t_1
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i)))
	t_2 = Float64(j * Float64(k * -27.0))
	t_3 = Float64(t_2 + Float64(t * Float64(a * -4.0)))
	tmp = 0.0
	if (t <= -3.1e+153)
		tmp = Float64(x * Float64(18.0 * Float64(z * Float64(y * t))));
	elseif (t <= -5.2e+97)
		tmp = t_3;
	elseif (t <= -1.1e-120)
		tmp = t_1;
	elseif (t <= 1.8e-208)
		tmp = Float64(Float64(b * c) + t_2);
	elseif (t <= 5.4e+76)
		tmp = t_1;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (b * c) - (x * (4.0 * i));
	t_2 = j * (k * -27.0);
	t_3 = t_2 + (t * (a * -4.0));
	tmp = 0.0;
	if (t <= -3.1e+153)
		tmp = x * (18.0 * (z * (y * t)));
	elseif (t <= -5.2e+97)
		tmp = t_3;
	elseif (t <= -1.1e-120)
		tmp = t_1;
	elseif (t <= 1.8e-208)
		tmp = (b * c) + t_2;
	elseif (t <= 5.4e+76)
		tmp = t_1;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.1e+153], N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.2e+97], t$95$3, If[LessEqual[t, -1.1e-120], t$95$1, If[LessEqual[t, 1.8e-208], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[t, 5.4e+76], t$95$1, t$95$3]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -5.2 \cdot 10^{+97}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t \leq -1.1 \cdot 10^{-120}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 5.4 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.1e153

    1. Initial program 74.2%

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

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

      \[\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 61.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*63.7%

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

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

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

    if -3.1e153 < t < -5.2e97 or 5.3999999999999998e76 < t

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

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

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

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

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

        \[\leadsto \left(a \cdot \color{blue}{\left(-4\right)}\right) \cdot t + j \cdot \left(k \cdot -27\right) \]
      4. distribute-rgt-neg-in60.7%

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

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

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

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

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

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

    if -5.2e97 < t < -1.10000000000000006e-120 or 1.7999999999999999e-208 < t < 5.3999999999999998e76

    1. Initial program 89.3%

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

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

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

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

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

    if -1.10000000000000006e-120 < t < 1.7999999999999999e-208

    1. Initial program 88.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.1 \cdot 10^{+153}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{+97}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-120}:\\ \;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{-208}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{+76}:\\ \;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 41.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot c + \left(t \cdot a\right) \cdot -4\\ \mathbf{if}\;z \leq 1.05 \cdot 10^{-230}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-170}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;z \leq 25000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+51}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+162}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (+ (* b c) (* (* t a) -4.0))))
   (if (<= z 1.05e-230)
     t_1
     (if (<= z 7.2e-170)
       (* x (* i -4.0))
       (if (<= z 25000000000.0)
         t_1
         (if (<= z 1.3e+51)
           (* k (* j -27.0))
           (if (<= z 3e+162) t_1 (* 18.0 (* (* y z) (* x t))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (b * c) + ((t * a) * -4.0);
	double tmp;
	if (z <= 1.05e-230) {
		tmp = t_1;
	} else if (z <= 7.2e-170) {
		tmp = x * (i * -4.0);
	} else if (z <= 25000000000.0) {
		tmp = t_1;
	} else if (z <= 1.3e+51) {
		tmp = k * (j * -27.0);
	} else if (z <= 3e+162) {
		tmp = t_1;
	} else {
		tmp = 18.0 * ((y * z) * (x * 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) :: t_1
    real(8) :: tmp
    t_1 = (b * c) + ((t * a) * (-4.0d0))
    if (z <= 1.05d-230) then
        tmp = t_1
    else if (z <= 7.2d-170) then
        tmp = x * (i * (-4.0d0))
    else if (z <= 25000000000.0d0) then
        tmp = t_1
    else if (z <= 1.3d+51) then
        tmp = k * (j * (-27.0d0))
    else if (z <= 3d+162) then
        tmp = t_1
    else
        tmp = 18.0d0 * ((y * z) * (x * t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (b * c) + ((t * a) * -4.0);
	double tmp;
	if (z <= 1.05e-230) {
		tmp = t_1;
	} else if (z <= 7.2e-170) {
		tmp = x * (i * -4.0);
	} else if (z <= 25000000000.0) {
		tmp = t_1;
	} else if (z <= 1.3e+51) {
		tmp = k * (j * -27.0);
	} else if (z <= 3e+162) {
		tmp = t_1;
	} else {
		tmp = 18.0 * ((y * z) * (x * t));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (b * c) + ((t * a) * -4.0)
	tmp = 0
	if z <= 1.05e-230:
		tmp = t_1
	elif z <= 7.2e-170:
		tmp = x * (i * -4.0)
	elif z <= 25000000000.0:
		tmp = t_1
	elif z <= 1.3e+51:
		tmp = k * (j * -27.0)
	elif z <= 3e+162:
		tmp = t_1
	else:
		tmp = 18.0 * ((y * z) * (x * t))
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0))
	tmp = 0.0
	if (z <= 1.05e-230)
		tmp = t_1;
	elseif (z <= 7.2e-170)
		tmp = Float64(x * Float64(i * -4.0));
	elseif (z <= 25000000000.0)
		tmp = t_1;
	elseif (z <= 1.3e+51)
		tmp = Float64(k * Float64(j * -27.0));
	elseif (z <= 3e+162)
		tmp = t_1;
	else
		tmp = Float64(18.0 * Float64(Float64(y * z) * Float64(x * t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (b * c) + ((t * a) * -4.0);
	tmp = 0.0;
	if (z <= 1.05e-230)
		tmp = t_1;
	elseif (z <= 7.2e-170)
		tmp = x * (i * -4.0);
	elseif (z <= 25000000000.0)
		tmp = t_1;
	elseif (z <= 1.3e+51)
		tmp = k * (j * -27.0);
	elseif (z <= 3e+162)
		tmp = t_1;
	else
		tmp = 18.0 * ((y * z) * (x * t));
	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[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 1.05e-230], t$95$1, If[LessEqual[z, 7.2e-170], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 25000000000.0], t$95$1, If[LessEqual[z, 1.3e+51], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e+162], t$95$1, N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot c + \left(t \cdot a\right) \cdot -4\\
\mathbf{if}\;z \leq 1.05 \cdot 10^{-230}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 7.2 \cdot 10^{-170}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\

\mathbf{elif}\;z \leq 25000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.3 \cdot 10^{+51}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\

\mathbf{elif}\;z \leq 3 \cdot 10^{+162}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < 1.0499999999999999e-230 or 7.2000000000000006e-170 < z < 2.5e10 or 1.3000000000000001e51 < z < 2.9999999999999998e162

    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. Simplified89.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 j around 0 78.7%

      \[\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)} \]
    5. Taylor expanded in x around 0 50.3%

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

    if 1.0499999999999999e-230 < z < 7.2000000000000006e-170

    1. Initial program 75.4%

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

      \[\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)} \]
    4. Taylor expanded in i around inf 51.1%

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

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

        \[\leadsto \left(\color{blue}{\left(-4\right)} \cdot i\right) \cdot x \]
      3. distribute-lft-neg-in51.1%

        \[\leadsto \color{blue}{\left(-4 \cdot i\right)} \cdot x \]
      4. distribute-lft-neg-in51.1%

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

        \[\leadsto -\color{blue}{x \cdot \left(4 \cdot i\right)} \]
      6. distribute-rgt-neg-in51.1%

        \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} \]
      7. distribute-lft-neg-in51.1%

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

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

        \[\leadsto x \cdot \color{blue}{\left(i \cdot -4\right)} \]
    6. Simplified51.1%

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

    if 2.5e10 < z < 1.3000000000000001e51

    1. Initial program 91.9%

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

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

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

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

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

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

    if 2.9999999999999998e162 < z

    1. Initial program 75.2%

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

      \[\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)} \]
    4. Taylor expanded in a around inf 70.6%

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

      \[\leadsto \left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - \color{blue}{4 \cdot \left(a \cdot t\right)} \]
    6. Step-by-step derivation
      1. *-commutative65.9%

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

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

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

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

      \[\leadsto \left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - \color{blue}{t \cdot \left(4 \cdot a\right)} \]
    8. Taylor expanded in y around inf 68.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*72.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 1.05 \cdot 10^{-230}:\\ \;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-170}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;z \leq 25000000000:\\ \;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+51}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+162}:\\ \;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\ \mathbf{else}:\\ \;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 49.5% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot c - x \cdot \left(4 \cdot i\right)\\ t_2 := x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{if}\;t \leq -9 \cdot 10^{+203}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{+93}:\\ \;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\ \mathbf{elif}\;t \leq -5.9 \cdot 10^{-123}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-208}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+104}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (- (* b c) (* x (* 4.0 i)))) (t_2 (* x (* 18.0 (* z (* y t))))))
   (if (<= t -9e+203)
     t_2
     (if (<= t -1.9e+93)
       (+ (* b c) (* (* t a) -4.0))
       (if (<= t -5.9e-123)
         t_1
         (if (<= t 1.3e-208)
           (+ (* b c) (* j (* k -27.0)))
           (if (<= t 4.4e+104) t_1 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 = (b * c) - (x * (4.0 * i));
	double t_2 = x * (18.0 * (z * (y * t)));
	double tmp;
	if (t <= -9e+203) {
		tmp = t_2;
	} else if (t <= -1.9e+93) {
		tmp = (b * c) + ((t * a) * -4.0);
	} else if (t <= -5.9e-123) {
		tmp = t_1;
	} else if (t <= 1.3e-208) {
		tmp = (b * c) + (j * (k * -27.0));
	} else if (t <= 4.4e+104) {
		tmp = t_1;
	} 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 = (b * c) - (x * (4.0d0 * i))
    t_2 = x * (18.0d0 * (z * (y * t)))
    if (t <= (-9d+203)) then
        tmp = t_2
    else if (t <= (-1.9d+93)) then
        tmp = (b * c) + ((t * a) * (-4.0d0))
    else if (t <= (-5.9d-123)) then
        tmp = t_1
    else if (t <= 1.3d-208) then
        tmp = (b * c) + (j * (k * (-27.0d0)))
    else if (t <= 4.4d+104) then
        tmp = t_1
    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 = (b * c) - (x * (4.0 * i));
	double t_2 = x * (18.0 * (z * (y * t)));
	double tmp;
	if (t <= -9e+203) {
		tmp = t_2;
	} else if (t <= -1.9e+93) {
		tmp = (b * c) + ((t * a) * -4.0);
	} else if (t <= -5.9e-123) {
		tmp = t_1;
	} else if (t <= 1.3e-208) {
		tmp = (b * c) + (j * (k * -27.0));
	} else if (t <= 4.4e+104) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (b * c) - (x * (4.0 * i))
	t_2 = x * (18.0 * (z * (y * t)))
	tmp = 0
	if t <= -9e+203:
		tmp = t_2
	elif t <= -1.9e+93:
		tmp = (b * c) + ((t * a) * -4.0)
	elif t <= -5.9e-123:
		tmp = t_1
	elif t <= 1.3e-208:
		tmp = (b * c) + (j * (k * -27.0))
	elif t <= 4.4e+104:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c, i, j, k)
	t_1 = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i)))
	t_2 = Float64(x * Float64(18.0 * Float64(z * Float64(y * t))))
	tmp = 0.0
	if (t <= -9e+203)
		tmp = t_2;
	elseif (t <= -1.9e+93)
		tmp = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0));
	elseif (t <= -5.9e-123)
		tmp = t_1;
	elseif (t <= 1.3e-208)
		tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0)));
	elseif (t <= 4.4e+104)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
	t_1 = (b * c) - (x * (4.0 * i));
	t_2 = x * (18.0 * (z * (y * t)));
	tmp = 0.0;
	if (t <= -9e+203)
		tmp = t_2;
	elseif (t <= -1.9e+93)
		tmp = (b * c) + ((t * a) * -4.0);
	elseif (t <= -5.9e-123)
		tmp = t_1;
	elseif (t <= 1.3e-208)
		tmp = (b * c) + (j * (k * -27.0));
	elseif (t <= 4.4e+104)
		tmp = t_1;
	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[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9e+203], t$95$2, If[LessEqual[t, -1.9e+93], N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.9e-123], t$95$1, If[LessEqual[t, 1.3e-208], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.4e+104], t$95$1, t$95$2]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot c - x \cdot \left(4 \cdot i\right)\\
t_2 := x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{if}\;t \leq -9 \cdot 10^{+203}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq -5.9 \cdot 10^{-123}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 4.4 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -9.0000000000000006e203 or 4.40000000000000001e104 < t

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

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

      \[\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*53.6%

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

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

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

    if -9.0000000000000006e203 < t < -1.8999999999999999e93

    1. Initial program 92.9%

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

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

    if -1.8999999999999999e93 < t < -5.89999999999999988e-123 or 1.30000000000000008e-208 < t < 4.40000000000000001e104

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

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

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

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

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

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

    if -5.89999999999999988e-123 < t < 1.30000000000000008e-208

    1. Initial program 88.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{+203}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \mathbf{elif}\;t \leq -1.9 \cdot 10^{+93}:\\ \;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\ \mathbf{elif}\;t \leq -5.9 \cdot 10^{-123}:\\ \;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-208}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{+104}:\\ \;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 34.4% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -2.15 \cdot 10^{+231}:\\
\;\;\;\;b \cdot c\\

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

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

\mathbf{elif}\;b \cdot c \leq 8 \cdot 10^{+137}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -2.14999999999999988e231 or 8.0000000000000003e137 < (*.f64 b c)

    1. Initial program 81.8%

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

      \[\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)} \]
    4. Taylor expanded in b around inf 73.3%

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

    if -2.14999999999999988e231 < (*.f64 b c) < 1.02e-235 or 1.12e-39 < (*.f64 b c) < 8.0000000000000003e137

    1. Initial program 85.7%

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

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

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

        \[\leadsto \left(\color{blue}{\left(-4\right)} \cdot i\right) \cdot x \]
      3. distribute-lft-neg-in28.4%

        \[\leadsto \color{blue}{\left(-4 \cdot i\right)} \cdot x \]
      4. distribute-lft-neg-in28.4%

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

        \[\leadsto -\color{blue}{x \cdot \left(4 \cdot i\right)} \]
      6. distribute-rgt-neg-in28.4%

        \[\leadsto \color{blue}{x \cdot \left(-4 \cdot i\right)} \]
      7. distribute-lft-neg-in28.4%

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

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

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

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

    if 1.02e-235 < (*.f64 b c) < 1.12e-39

    1. Initial program 88.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -2.15 \cdot 10^{+231}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 1.02 \cdot 10^{-235}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{elif}\;b \cdot c \leq 1.12 \cdot 10^{-39}:\\ \;\;\;\;k \cdot \left(j \cdot -27\right)\\ \mathbf{elif}\;b \cdot c \leq 8 \cdot 10^{+137}:\\ \;\;\;\;x \cdot \left(i \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 34.5% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := \left(t \cdot a\right) \cdot -4\\
\mathbf{if}\;b \cdot c \leq -1.25 \cdot 10^{+261}:\\
\;\;\;\;b \cdot c\\

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

\mathbf{elif}\;b \cdot c \leq 9 \cdot 10^{-64}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\

\mathbf{elif}\;b \cdot c \leq 3.1 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -1.25e261 or 3.1000000000000001e88 < (*.f64 b c)

    1. Initial program 81.9%

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

      \[\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)} \]
    4. Taylor expanded in b around inf 69.0%

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

    if -1.25e261 < (*.f64 b c) < -5.7999999999999999e-213 or 9.00000000000000019e-64 < (*.f64 b c) < 3.1000000000000001e88

    1. Initial program 85.7%

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

      \[\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)} \]
    4. Taylor expanded in a around inf 38.0%

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
    5. Step-by-step derivation
      1. *-commutative38.0%

        \[\leadsto \color{blue}{\left(a \cdot t\right) \cdot -4} \]
      2. *-commutative38.0%

        \[\leadsto \color{blue}{\left(t \cdot a\right)} \cdot -4 \]
    6. Simplified38.0%

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

    if -5.7999999999999999e-213 < (*.f64 b c) < 9.00000000000000019e-64

    1. Initial program 86.9%

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

      \[\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)} \]
    4. Taylor expanded in y around inf 38.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.25 \cdot 10^{+261}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -5.8 \cdot 10^{-213}:\\ \;\;\;\;\left(t \cdot a\right) \cdot -4\\ \mathbf{elif}\;b \cdot c \leq 9 \cdot 10^{-64}:\\ \;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 3.1 \cdot 10^{+88}:\\ \;\;\;\;\left(t \cdot a\right) \cdot -4\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 34.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := \left(t \cdot a\right) \cdot -4\\
\mathbf{if}\;b \cdot c \leq -1.25 \cdot 10^{+261}:\\
\;\;\;\;b \cdot c\\

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

\mathbf{elif}\;b \cdot c \leq 7.5 \cdot 10^{-61}:\\
\;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\

\mathbf{elif}\;b \cdot c \leq 4.3 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -1.25e261 or 4.29999999999999974e88 < (*.f64 b c)

    1. Initial program 81.9%

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

      \[\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)} \]
    4. Taylor expanded in b around inf 69.0%

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

    if -1.25e261 < (*.f64 b c) < -1.29999999999999997e-217 or 7.50000000000000047e-61 < (*.f64 b c) < 4.29999999999999974e88

    1. Initial program 85.7%

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

      \[\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)} \]
    4. Taylor expanded in a around inf 38.0%

      \[\leadsto \color{blue}{-4 \cdot \left(a \cdot t\right)} \]
    5. Step-by-step derivation
      1. *-commutative38.0%

        \[\leadsto \color{blue}{\left(a \cdot t\right) \cdot -4} \]
      2. *-commutative38.0%

        \[\leadsto \color{blue}{\left(t \cdot a\right)} \cdot -4 \]
    6. Simplified38.0%

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

    if -1.29999999999999997e-217 < (*.f64 b c) < 7.50000000000000047e-61

    1. Initial program 86.9%

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

      \[\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)} \]
    4. Taylor expanded in a around inf 89.7%

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

      \[\leadsto \left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - \color{blue}{4 \cdot \left(a \cdot t\right)} \]
    6. Step-by-step derivation
      1. *-commutative80.0%

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

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

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

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

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

      \[\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*42.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.25 \cdot 10^{+261}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq -1.3 \cdot 10^{-217}:\\ \;\;\;\;\left(t \cdot a\right) \cdot -4\\ \mathbf{elif}\;b \cdot c \leq 7.5 \cdot 10^{-61}:\\ \;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\ \mathbf{elif}\;b \cdot c \leq 4.3 \cdot 10^{+88}:\\ \;\;\;\;\left(t \cdot a\right) \cdot -4\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 65.2% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t \leq -1.5 \cdot 10^{+103}:\\
\;\;\;\;t\_2\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.2000000000000001e153

    1. Initial program 74.2%

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

      \[\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*69.0%

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

      \[\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 -7.2000000000000001e153 < t < -1.5e103 or 1.7999999999999999e226 < t

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.5e103 < t < 1.2e84

    1. Initial program 89.1%

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

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

    if 1.2e84 < t < 1.7999999999999999e226

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{+153}:\\ \;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right) + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;t \leq -1.5 \cdot 10^{+103}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+84}:\\ \;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\ \mathbf{elif}\;t \leq 1.8 \cdot 10^{+226}:\\ \;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(a \cdot -4\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 66.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -1.65 \cdot 10^{+161}:\\
\;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right) + t\_1\\

\mathbf{elif}\;t \leq -108:\\
\;\;\;\;\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - t\_2\\

\mathbf{elif}\;t \leq 2.2 \cdot 10^{+83}:\\
\;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + t\_2\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.64999999999999999e161

    1. Initial program 72.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. Simplified87.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 70.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*70.2%

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

      \[\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.64999999999999999e161 < t < -108

    1. Initial program 96.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. 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 j around 0 85.0%

      \[\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)} \]
    5. Taylor expanded in y around 0 82.1%

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

    if -108 < t < 2.19999999999999999e83

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

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

    if 2.19999999999999999e83 < t < 1.65000000000000003e228

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

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

    if 1.65000000000000003e228 < t

    1. Initial program 78.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 81.1% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
t_2 := b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -2.95 \cdot 10^{+144}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.94999999999999994e144

    1. Initial program 72.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. Simplified83.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 j around 0 81.5%

      \[\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)} \]
    5. Taylor expanded in i around 0 84.2%

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

    if -2.94999999999999994e144 < t < 3.50000000000000006e50

    1. Initial program 90.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. Simplified90.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 y around 0 88.7%

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

    if 3.50000000000000006e50 < t

    1. Initial program 79.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.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 j around 0 85.7%

      \[\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 3 regimes into one program.
  4. Final simplification87.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.95 \cdot 10^{+144}:\\ \;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+50}:\\ \;\;\;\;\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\ \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 17: 74.8% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
t_2 := b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -4.2 \cdot 10^{+130}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 2.5 \cdot 10^{+49}:\\
\;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + t\_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.19999999999999981e130 or 2.5000000000000002e49 < t

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

      \[\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)} \]
    5. Taylor expanded in i around 0 80.8%

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

    if -4.19999999999999981e130 < t < -7.99999999999999964e-6

    1. Initial program 99.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. Simplified92.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 j around 0 85.6%

      \[\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)} \]
    5. Taylor expanded in y around 0 85.7%

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

    if -7.99999999999999964e-6 < t < 2.5000000000000002e49

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

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

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

Alternative 18: 80.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.05 \cdot 10^{+136} \lor \neg \left(t \leq 5.5 \cdot 10^{+106}\right):\\ \;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - \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 -2.05e+136) (not (<= t 5.5e+106)))
   (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
   (- (+ (* b c) (* (* t a) -4.0)) (+ (* 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 <= -2.05e+136) || !(t <= 5.5e+106)) {
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	} else {
		tmp = ((b * c) + ((t * a) * -4.0)) - ((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 <= (-2.05d+136)) .or. (.not. (t <= 5.5d+106))) then
        tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
    else
        tmp = ((b * c) + ((t * a) * (-4.0d0))) - ((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 <= -2.05e+136) || !(t <= 5.5e+106)) {
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	} else {
		tmp = ((b * c) + ((t * a) * -4.0)) - ((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 <= -2.05e+136) or not (t <= 5.5e+106):
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))
	else:
		tmp = ((b * c) + ((t * a) * -4.0)) - ((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 <= -2.05e+136) || !(t <= 5.5e+106))
		tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))));
	else
		tmp = Float64(Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)) - 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 <= -2.05e+136) || ~((t <= 5.5e+106)))
		tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
	else
		tmp = ((b * c) + ((t * a) * -4.0)) - ((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, -2.05e+136], N[Not[LessEqual[t, 5.5e+106]], $MachinePrecision]], 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[(N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $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 -2.05 \cdot 10^{+136} \lor \neg \left(t \leq 5.5 \cdot 10^{+106}\right):\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\

\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + \left(t \cdot a\right) \cdot -4\right) - \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 < -2.0499999999999999e136 or 5.5e106 < t

    1. Initial program 75.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. Simplified85.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 j around 0 83.4%

      \[\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)} \]
    5. Taylor expanded in i around 0 83.7%

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

    if -2.0499999999999999e136 < t < 5.5e106

    1. Initial program 90.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. Simplified90.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 y around 0 88.1%

      \[\leadsto \color{blue}{\left(-4 \cdot \left(a \cdot t\right) + b \cdot c\right) - \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 simplification86.6%

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

Alternative 19: 75.9% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{-25} \lor \neg \left(x \leq 3500000000000\right):\\
\;\;\;\;b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.35000000000000008e-25 or 3.5e12 < x

    1. Initial program 75.1%

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

      \[\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)} \]
    4. Taylor expanded in a around inf 86.6%

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

      \[\leadsto \left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - \color{blue}{4 \cdot \left(a \cdot t\right)} \]
    6. Step-by-step derivation
      1. *-commutative85.7%

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

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

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

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

      \[\leadsto \left(b \cdot c + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right) - \color{blue}{t \cdot \left(4 \cdot a\right)} \]
    8. Taylor expanded in a around 0 82.3%

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

    if -1.35000000000000008e-25 < x < 3.5e12

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

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

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

Alternative 20: 72.9% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.6 \cdot 10^{+68} \lor \neg \left(x \leq 3.6 \cdot 10^{+88}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.5999999999999998e68 or 3.6000000000000002e88 < x

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

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

    if -2.5999999999999998e68 < x < 3.6000000000000002e88

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

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

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

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

Alternative 21: 50.3% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot c + \left(t \cdot a\right) \cdot -4\\ \mathbf{if}\;a \leq -5.6 \cdot 10^{+91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.45 \cdot 10^{+16}:\\ \;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{+88}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(x \cdot \left(z \cdot t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (+ (* b c) (* (* t a) -4.0))))
   (if (<= a -5.6e+91)
     t_1
     (if (<= a 1.45e+16)
       (+ (* b c) (* j (* k -27.0)))
       (if (<= a 4.2e+88) (* 18.0 (* y (* x (* z t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (b * c) + ((t * a) * -4.0);
	double tmp;
	if (a <= -5.6e+91) {
		tmp = t_1;
	} else if (a <= 1.45e+16) {
		tmp = (b * c) + (j * (k * -27.0));
	} else if (a <= 4.2e+88) {
		tmp = 18.0 * (y * (x * (z * t)));
	} 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) + ((t * a) * (-4.0d0))
    if (a <= (-5.6d+91)) then
        tmp = t_1
    else if (a <= 1.45d+16) then
        tmp = (b * c) + (j * (k * (-27.0d0)))
    else if (a <= 4.2d+88) then
        tmp = 18.0d0 * (y * (x * (z * t)))
    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) + ((t * a) * -4.0);
	double tmp;
	if (a <= -5.6e+91) {
		tmp = t_1;
	} else if (a <= 1.45e+16) {
		tmp = (b * c) + (j * (k * -27.0));
	} else if (a <= 4.2e+88) {
		tmp = 18.0 * (y * (x * (z * t)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (b * c) + ((t * a) * -4.0)
	tmp = 0
	if a <= -5.6e+91:
		tmp = t_1
	elif a <= 1.45e+16:
		tmp = (b * c) + (j * (k * -27.0))
	elif a <= 4.2e+88:
		tmp = 18.0 * (y * (x * (z * t)))
	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(Float64(t * a) * -4.0))
	tmp = 0.0
	if (a <= -5.6e+91)
		tmp = t_1;
	elseif (a <= 1.45e+16)
		tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0)));
	elseif (a <= 4.2e+88)
		tmp = Float64(18.0 * Float64(y * Float64(x * Float64(z * t))));
	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) + ((t * a) * -4.0);
	tmp = 0.0;
	if (a <= -5.6e+91)
		tmp = t_1;
	elseif (a <= 1.45e+16)
		tmp = (b * c) + (j * (k * -27.0));
	elseif (a <= 4.2e+88)
		tmp = 18.0 * (y * (x * (z * t)));
	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[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.6e+91], t$95$1, If[LessEqual[a, 1.45e+16], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.2e+88], N[(18.0 * N[(y * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot c + \left(t \cdot a\right) \cdot -4\\
\mathbf{if}\;a \leq -5.6 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.45 \cdot 10^{+16}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\

\mathbf{elif}\;a \leq 4.2 \cdot 10^{+88}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(x \cdot \left(z \cdot t\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -5.5999999999999997e91 or 4.2e88 < a

    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. Simplified86.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 j around 0 81.5%

      \[\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)} \]
    5. Taylor expanded in x around 0 61.9%

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

    if -5.5999999999999997e91 < a < 1.45e16

    1. Initial program 88.7%

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

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

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

    if 1.45e16 < a < 4.2e88

    1. Initial program 70.9%

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

      \[\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)} \]
    4. Taylor expanded in a around inf 82.2%

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

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

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

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

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

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

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

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

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

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

Alternative 22: 50.2% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := b \cdot c + \left(t \cdot a\right) \cdot -4\\ \mathbf{if}\;a \leq -3.3 \cdot 10^{+91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 8 \cdot 10^{+15}:\\ \;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{+90}:\\ \;\;\;\;18 \cdot \left(y \cdot \left(x \cdot \left(z \cdot t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i j k)
 :precision binary64
 (let* ((t_1 (+ (* b c) (* (* t a) -4.0))))
   (if (<= a -3.3e+91)
     t_1
     (if (<= a 8e+15)
       (- (* b c) (* 27.0 (* j k)))
       (if (<= a 1.1e+90) (* 18.0 (* y (* x (* z t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
	double t_1 = (b * c) + ((t * a) * -4.0);
	double tmp;
	if (a <= -3.3e+91) {
		tmp = t_1;
	} else if (a <= 8e+15) {
		tmp = (b * c) - (27.0 * (j * k));
	} else if (a <= 1.1e+90) {
		tmp = 18.0 * (y * (x * (z * t)));
	} 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) + ((t * a) * (-4.0d0))
    if (a <= (-3.3d+91)) then
        tmp = t_1
    else if (a <= 8d+15) then
        tmp = (b * c) - (27.0d0 * (j * k))
    else if (a <= 1.1d+90) then
        tmp = 18.0d0 * (y * (x * (z * t)))
    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) + ((t * a) * -4.0);
	double tmp;
	if (a <= -3.3e+91) {
		tmp = t_1;
	} else if (a <= 8e+15) {
		tmp = (b * c) - (27.0 * (j * k));
	} else if (a <= 1.1e+90) {
		tmp = 18.0 * (y * (x * (z * t)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k):
	t_1 = (b * c) + ((t * a) * -4.0)
	tmp = 0
	if a <= -3.3e+91:
		tmp = t_1
	elif a <= 8e+15:
		tmp = (b * c) - (27.0 * (j * k))
	elif a <= 1.1e+90:
		tmp = 18.0 * (y * (x * (z * t)))
	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(Float64(t * a) * -4.0))
	tmp = 0.0
	if (a <= -3.3e+91)
		tmp = t_1;
	elseif (a <= 8e+15)
		tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k)));
	elseif (a <= 1.1e+90)
		tmp = Float64(18.0 * Float64(y * Float64(x * Float64(z * t))));
	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) + ((t * a) * -4.0);
	tmp = 0.0;
	if (a <= -3.3e+91)
		tmp = t_1;
	elseif (a <= 8e+15)
		tmp = (b * c) - (27.0 * (j * k));
	elseif (a <= 1.1e+90)
		tmp = 18.0 * (y * (x * (z * t)));
	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[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.3e+91], t$95$1, If[LessEqual[a, 8e+15], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.1e+90], N[(18.0 * N[(y * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := b \cdot c + \left(t \cdot a\right) \cdot -4\\
\mathbf{if}\;a \leq -3.3 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 8 \cdot 10^{+15}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\

\mathbf{elif}\;a \leq 1.1 \cdot 10^{+90}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(x \cdot \left(z \cdot t\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.30000000000000017e91 or 1.09999999999999995e90 < a

    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. Simplified86.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 j around 0 81.5%

      \[\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)} \]
    5. Taylor expanded in x around 0 61.9%

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

    if -3.30000000000000017e91 < a < 8e15

    1. Initial program 88.7%

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

      \[\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 0 53.4%

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

    if 8e15 < a < 1.09999999999999995e90

    1. Initial program 70.9%

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

      \[\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)} \]
    4. Taylor expanded in a around inf 82.2%

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

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

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

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

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

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

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

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

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

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

Alternative 23: 37.5% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.75 \cdot 10^{+45} \lor \neg \left(b \cdot c \leq 5 \cdot 10^{+166}\right):\\
\;\;\;\;b \cdot c\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -2.75e45 or 5.0000000000000002e166 < (*.f64 b c)

    1. Initial program 80.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 88.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)} \]
    4. Taylor expanded in b around inf 60.2%

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

    if -2.75e45 < (*.f64 b c) < 5.0000000000000002e166

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

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

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

Alternative 24: 23.7% 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 84.9%

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

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

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

Developer target: 89.4% 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 2024078 
(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
  (if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))

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