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

Percentage Accurate: 85.3% → 92.3%
Time: 35.9s
Alternatives: 20
Speedup: 0.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 85.3% 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: 92.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;x \leq 500000000:\\
\;\;\;\;\left(\left(b \cdot c + t \cdot \left(z \cdot \left(x \cdot \left(y \cdot 18\right)\right) + -4 \cdot a\right)\right) - i \cdot \left(x \cdot 4\right)\right) - t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.7000000000000001e42 or 5e8 < x

    1. Initial program 82.7%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(x \cdot \left(\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \frac{b \cdot c}{x}\right) - \left(4 \cdot i + 4 \cdot \frac{a \cdot t}{x}\right)\right)\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(\frac{b \cdot c}{x} - \left(4 \cdot i + 4 \cdot \frac{a \cdot t}{x}\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, \color{blue}{27}\right), k\right)\right) \]
      3. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(t \cdot \left(y \cdot z\right)\right) \cdot 18\right), \left(\frac{b \cdot c}{x} - \left(4 \cdot i + 4 \cdot \frac{a \cdot t}{x}\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(t \cdot \left(\left(y \cdot z\right) \cdot 18\right)\right), \left(\frac{b \cdot c}{x} - \left(4 \cdot i + 4 \cdot \frac{a \cdot t}{x}\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(y \cdot z\right) \cdot 18\right)\right), \left(\frac{b \cdot c}{x} - \left(4 \cdot i + 4 \cdot \frac{a \cdot t}{x}\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(\left(y \cdot z\right), 18\right)\right), \left(\frac{b \cdot c}{x} - \left(4 \cdot i + 4 \cdot \frac{a \cdot t}{x}\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), 18\right)\right), \left(\frac{b \cdot c}{x} - \left(4 \cdot i + 4 \cdot \frac{a \cdot t}{x}\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), 18\right)\right), \left(\frac{b \cdot c}{x} - \left(4 \cdot \frac{a \cdot t}{x} + 4 \cdot i\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      10. associate--r+N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), 18\right)\right), \left(\left(\frac{b \cdot c}{x} - 4 \cdot \frac{a \cdot t}{x}\right) - 4 \cdot i\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      11. associate-*r/N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), 18\right)\right), \left(\left(\frac{b \cdot c}{x} - \frac{4 \cdot \left(a \cdot t\right)}{x}\right) - 4 \cdot i\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      12. div-subN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), 18\right)\right), \left(\frac{b \cdot c - 4 \cdot \left(a \cdot t\right)}{x} - 4 \cdot i\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      13. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), 18\right)\right), \left(\frac{b \cdot c - 4 \cdot \left(a \cdot t\right)}{x} + \left(\mathsf{neg}\left(4 \cdot i\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      14. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), 18\right)\right), \left(\frac{b \cdot c - 4 \cdot \left(a \cdot t\right)}{x} + \left(\mathsf{neg}\left(4\right)\right) \cdot i\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      15. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), 18\right)\right), \left(\frac{b \cdot c - 4 \cdot \left(a \cdot t\right)}{x} + -4 \cdot i\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    5. Simplified95.6%

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

    if -2.7000000000000001e42 < x < 5e8

    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. Add Preprocessing
    3. Step-by-step derivation
      1. distribute-rgt-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right) \cdot t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      4. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(x \cdot \left(18 \cdot y\right)\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(18 \cdot y\right)\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(18, y\right)\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(18, y\right)\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(18, y\right)\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      12. metadata-eval94.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(18, y\right)\right), z\right), \mathsf{*.f64}\left(a, -4\right)\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Applied egg-rr94.9%

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

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

Alternative 2: 82.8% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.19999999999999975e-46 or 2.49999999999999977e-22 < x

    1. Initial program 85.1%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot \left(z \cdot t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\left(\left(z \cdot t\right) \cdot \left(\left(x \cdot 18\right) \cdot y\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(z \cdot t\right), \left(\left(x \cdot 18\right) \cdot y\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot 18\right) \cdot y\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(x \cdot \left(18 \cdot y\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{*.f64}\left(x, \left(18 \cdot y\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      7. *-lowering-*.f6484.2%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(18, y\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Applied egg-rr84.2%

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) - 4 \cdot \left(a \cdot t\right)\right) - 4 \cdot \left(i \cdot x\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      2. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right) - 4 \cdot \left(i \cdot x\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + -4 \cdot \left(a \cdot t\right)\right) - 4 \cdot \left(i \cdot x\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\left(-4 \cdot \left(a \cdot t\right) + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - 4 \cdot \left(i \cdot x\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(-4 \cdot \left(a \cdot t\right) + \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) - 4 \cdot \left(i \cdot x\right)\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      6. sub-negN/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(-4 \cdot \left(a \cdot t\right) + \left(\left(18 \cdot t\right) \cdot \left(x \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4 \cdot \left(i \cdot x\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(-4 \cdot \left(a \cdot t\right) + \left(\left(18 \cdot t\right) \cdot \left(x \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(-4 \cdot \left(a \cdot t\right) + \left(\left(18 \cdot t\right) \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot \left(i \cdot x\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(-4 \cdot \left(a \cdot t\right) + \left(\left(18 \cdot t\right) \cdot \left(\left(y \cdot z\right) \cdot x\right) + -4 \cdot \left(i \cdot x\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      11. associate-*r*N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(-4 \cdot \left(a \cdot t\right) + \left(\left(\left(18 \cdot t\right) \cdot \left(y \cdot z\right)\right) \cdot x + -4 \cdot \left(i \cdot x\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      12. associate-*r*N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(-4 \cdot \left(a \cdot t\right) + \left(\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot x + -4 \cdot \left(i \cdot x\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      13. associate-*r*N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(-4 \cdot \left(a \cdot t\right) + \left(\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot x + \left(-4 \cdot i\right) \cdot x\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      14. distribute-rgt-inN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(-4 \cdot \left(a \cdot t\right) + x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + -4 \cdot i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, \color{blue}{27}\right), k\right)\right) \]
    7. Simplified85.3%

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

    if -4.19999999999999975e-46 < x < 2.49999999999999977e-22

    1. Initial program 93.8%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot \left(z \cdot t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\left(\left(z \cdot t\right) \cdot \left(\left(x \cdot 18\right) \cdot y\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(z \cdot t\right), \left(\left(x \cdot 18\right) \cdot y\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot 18\right) \cdot y\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(x \cdot \left(18 \cdot y\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{*.f64}\left(x, \left(18 \cdot y\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      7. *-lowering-*.f6489.7%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(18, y\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Applied egg-rr89.7%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    6. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) - 4 \cdot \left(a \cdot t\right)\right), \left(b \cdot c\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
    7. Simplified90.8%

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

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

Alternative 3: 87.7% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -4.0000000000000001e27

    1. Initial program 78.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot \left(z \cdot t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\left(\left(z \cdot t\right) \cdot \left(\left(x \cdot 18\right) \cdot y\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(z \cdot t\right), \left(\left(x \cdot 18\right) \cdot y\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot 18\right) \cdot y\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(x \cdot \left(18 \cdot y\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{*.f64}\left(x, \left(18 \cdot y\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      7. *-lowering-*.f6479.6%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(18, y\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Applied egg-rr79.6%

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

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

        \[\leadsto \mathsf{\_.f64}\left(\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) - 4 \cdot \left(a \cdot t\right)\right) - 4 \cdot \left(i \cdot x\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      2. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)\right) - 4 \cdot \left(i \cdot x\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + -4 \cdot \left(a \cdot t\right)\right) - 4 \cdot \left(i \cdot x\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(\left(-4 \cdot \left(a \cdot t\right) + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - 4 \cdot \left(i \cdot x\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
      5. associate--l+N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(-4 \cdot \left(a \cdot t\right) + \left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) - 4 \cdot \left(i \cdot x\right)\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      6. sub-negN/A

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

        \[\leadsto \mathsf{\_.f64}\left(\left(-4 \cdot \left(a \cdot t\right) + \left(\left(18 \cdot t\right) \cdot \left(x \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4 \cdot \left(i \cdot x\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(-4 \cdot \left(a \cdot t\right) + \left(\left(18 \cdot t\right) \cdot \left(x \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(i \cdot x\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(-4 \cdot \left(a \cdot t\right) + \left(\left(18 \cdot t\right) \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot \left(i \cdot x\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\left(-4 \cdot \left(a \cdot t\right) + \left(\left(18 \cdot t\right) \cdot \left(\left(y \cdot z\right) \cdot x\right) + -4 \cdot \left(i \cdot x\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      11. associate-*r*N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(-4 \cdot \left(a \cdot t\right) + \left(\left(\left(18 \cdot t\right) \cdot \left(y \cdot z\right)\right) \cdot x + -4 \cdot \left(i \cdot x\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      12. associate-*r*N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(-4 \cdot \left(a \cdot t\right) + \left(\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot x + -4 \cdot \left(i \cdot x\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      13. associate-*r*N/A

        \[\leadsto \mathsf{\_.f64}\left(\left(-4 \cdot \left(a \cdot t\right) + \left(\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right) \cdot x + \left(-4 \cdot i\right) \cdot x\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      14. distribute-rgt-inN/A

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

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

    if -4.0000000000000001e27 < x

    1. Initial program 92.0%

      \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. distribute-rgt-out--N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(t \cdot \left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right) \cdot t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z - a \cdot 4\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      4. sub-negN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z + \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\left(x \cdot 18\right) \cdot y\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(x \cdot \left(18 \cdot y\right)\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \left(18 \cdot y\right)\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(18, y\right)\right), z\right), \left(\mathsf{neg}\left(a \cdot 4\right)\right)\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      10. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(18, y\right)\right), z\right), \left(a \cdot \left(\mathsf{neg}\left(4\right)\right)\right)\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(18, y\right)\right), z\right), \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(4\right)\right)\right)\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      12. metadata-eval93.0%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, \mathsf{*.f64}\left(18, y\right)\right), z\right), \mathsf{*.f64}\left(a, -4\right)\right), t\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Applied egg-rr93.0%

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

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

Alternative 4: 76.0% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;i \leq 0.36:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -2.6e22

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
      2. *-lowering-*.f6479.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    5. Simplified79.9%

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

    if -2.6e22 < i < 0.35999999999999999

    1. Initial program 93.2%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(\left(18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + b \cdot c\right) - 4 \cdot \left(a \cdot t\right)\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

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

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

    if 0.35999999999999999 < i

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \left(x \cdot i\right)\right), \left(-27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(x, i\right)\right), \left(-27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      13. *-commutativeN/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(x, i\right)\right), \left(j \cdot \left(-27 \cdot \color{blue}{k}\right)\right)\right)\right) \]
      16. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(x, i\right)\right), \mathsf{*.f64}\left(j, \left(k \cdot \color{blue}{-27}\right)\right)\right)\right) \]
      18. *-lowering-*.f6475.2%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(x, i\right)\right), \mathsf{*.f64}\left(j, \mathsf{*.f64}\left(k, \color{blue}{-27}\right)\right)\right)\right) \]
    5. Simplified75.2%

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

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

Alternative 5: 76.2% accurate, 1.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.00000000000000011e25 or 3.70000000000000029e36 < x

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      2. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + \left(\mathsf{neg}\left(4\right)\right) \cdot i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, \color{blue}{27}\right), k\right)\right) \]
      3. metadata-evalN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + -4 \cdot i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right), \left(-4 \cdot i\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, \color{blue}{27}\right), k\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(\left(t \cdot \left(y \cdot z\right)\right) \cdot 18\right), \left(-4 \cdot i\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      6. associate-*l*N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\left(t \cdot \left(\left(y \cdot z\right) \cdot 18\right)\right), \left(-4 \cdot i\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \left(\left(y \cdot z\right) \cdot 18\right)\right), \left(-4 \cdot i\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(\left(y \cdot z\right), 18\right)\right), \left(-4 \cdot i\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), 18\right)\right), \left(-4 \cdot i\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      10. *-lowering-*.f6479.2%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), 18\right)\right), \mathsf{*.f64}\left(-4, i\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    5. Simplified79.2%

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

    if -6.00000000000000011e25 < x < 3.70000000000000029e36

    1. Initial program 95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(j, \mathsf{*.f64}\left(k, -27\right)\right), \mathsf{*.f64}\left(-4, \color{blue}{\left(a \cdot t\right)}\right)\right)\right) \]
      18. *-lowering-*.f6479.4%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(j, \mathsf{*.f64}\left(k, -27\right)\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, \color{blue}{t}\right)\right)\right)\right) \]
    5. Simplified79.4%

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

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

Alternative 6: 59.1% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;x \leq -1.4 \cdot 10^{-298}:\\
\;\;\;\;b \cdot c - t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.19999999999999993e-17 or 1.5999999999999999e36 < x

    1. Initial program 82.9%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(x, \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + -4 \cdot i\right)\right) \]
      4. +-lowering-+.f64N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(\left(y \cdot z\right), 18\right)\right), \left(-4 \cdot i\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), 18\right)\right), \left(-4 \cdot i\right)\right)\right) \]
      10. *-lowering-*.f6466.3%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), 18\right)\right), \mathsf{*.f64}\left(-4, \color{blue}{i}\right)\right)\right) \]
    5. Simplified66.3%

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

    if -1.19999999999999993e-17 < x < -1.39999999999999996e-298

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f6463.1%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
    5. Simplified63.1%

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

    if -1.39999999999999996e-298 < x < 1.5999999999999999e36

    1. Initial program 93.8%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(-4 \cdot \left(a \cdot t\right)\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      2. *-lowering-*.f6462.6%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, \color{blue}{27}\right), k\right)\right) \]
    5. Simplified62.6%

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

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

Alternative 7: 59.0% accurate, 1.1× speedup?

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

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

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

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

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


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

    1. Initial program 88.3%

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

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

        \[\leadsto \mathsf{*.f64}\left(t, \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)}\right) \]
      2. cancel-sign-sub-invN/A

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

        \[\leadsto \mathsf{*.f64}\left(t, \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot a\right)\right) \]
      4. +-lowering-+.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(18, \mathsf{*.f64}\left(x, \left(y \cdot z\right)\right)\right), \left(-4 \cdot a\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(18, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right)\right), \left(-4 \cdot a\right)\right)\right) \]
      8. *-lowering-*.f6474.2%

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(18, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right)\right), \mathsf{*.f64}\left(-4, \color{blue}{a}\right)\right)\right) \]
    5. Simplified74.2%

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

    if -1.79999999999999998e58 < t < -7.5e-152

    1. Initial program 86.3%

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
      2. *-lowering-*.f6470.0%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    5. Simplified70.0%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(-4, \color{blue}{\left(a \cdot t + i \cdot x\right)}\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{+.f64}\left(\left(a \cdot t\right), \color{blue}{\left(i \cdot x\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, t\right), \left(x \cdot \color{blue}{i}\right)\right)\right) \]
      8. *-lowering-*.f6450.4%

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, t\right), \mathsf{*.f64}\left(x, \color{blue}{i}\right)\right)\right) \]
    8. Simplified50.4%

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

    if -7.5e-152 < t < 1.6199999999999999e-43

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f6462.0%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
    5. Simplified62.0%

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

    if 1.6199999999999999e-43 < t

    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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot \left(z \cdot t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\left(\left(z \cdot t\right) \cdot \left(\left(x \cdot 18\right) \cdot y\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(z \cdot t\right), \left(\left(x \cdot 18\right) \cdot y\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(\left(x \cdot 18\right) \cdot y\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, t\right), \left(x \cdot \left(18 \cdot y\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{*.f64}\left(x, \left(18 \cdot y\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      7. *-lowering-*.f6491.9%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(z, t\right), \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(18, y\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, 4\right), t\right)\right), \mathsf{*.f64}\left(b, c\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Applied egg-rr91.9%

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

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

        \[\leadsto \mathsf{*.f64}\left(t, \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)}\right) \]
      2. cancel-sign-sub-invN/A

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

        \[\leadsto \mathsf{*.f64}\left(t, \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot a\right)\right) \]
      4. +-lowering-+.f64N/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(18, \left(z \cdot \left(x \cdot y\right)\right)\right), \left(-4 \cdot a\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(18, \mathsf{*.f64}\left(z, \left(x \cdot y\right)\right)\right), \left(-4 \cdot a\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(18, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \left(-4 \cdot a\right)\right)\right) \]
      10. *-lowering-*.f6462.5%

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(18, \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(x, y\right)\right)\right), \mathsf{*.f64}\left(-4, \color{blue}{a}\right)\right)\right) \]
    7. Simplified62.5%

      \[\leadsto \color{blue}{t \cdot \left(18 \cdot \left(z \cdot \left(x \cdot y\right)\right) + -4 \cdot a\right)} \]
    8. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(18 \cdot z\right), x\right), y\right), \mathsf{*.f64}\left(-4, a\right)\right)\right) \]
      5. *-lowering-*.f6461.2%

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(18, z\right), x\right), y\right), \mathsf{*.f64}\left(-4, a\right)\right)\right) \]
    9. Applied egg-rr61.2%

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

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

Alternative 8: 59.0% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -2.2 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.2000000000000001e55 or 2.6e-43 < t

    1. Initial program 92.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 t around inf

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

        \[\leadsto \mathsf{*.f64}\left(t, \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)}\right) \]
      2. cancel-sign-sub-invN/A

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

        \[\leadsto \mathsf{*.f64}\left(t, \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot a\right)\right) \]
      4. +-lowering-+.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(18, \mathsf{*.f64}\left(x, \left(y \cdot z\right)\right)\right), \left(-4 \cdot a\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(18, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right)\right), \left(-4 \cdot a\right)\right)\right) \]
      8. *-lowering-*.f6467.0%

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(18, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right)\right), \mathsf{*.f64}\left(-4, \color{blue}{a}\right)\right)\right) \]
    5. Simplified67.0%

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

    if -2.2000000000000001e55 < t < -4.8000000000000002e-148

    1. Initial program 86.3%

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
      2. *-lowering-*.f6470.0%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    5. Simplified70.0%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(-4, \color{blue}{\left(a \cdot t + i \cdot x\right)}\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{+.f64}\left(\left(a \cdot t\right), \color{blue}{\left(i \cdot x\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, t\right), \left(x \cdot \color{blue}{i}\right)\right)\right) \]
      8. *-lowering-*.f6450.4%

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, t\right), \mathsf{*.f64}\left(x, \color{blue}{i}\right)\right)\right) \]
    8. Simplified50.4%

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

    if -4.8000000000000002e-148 < t < 2.6e-43

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f6462.0%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
    5. Simplified62.0%

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

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

Alternative 9: 53.2% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 84.7%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f6464.4%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
    5. Simplified64.4%

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

    if -0.10000000000000001 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 5.0000000000000002e91

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
      2. *-lowering-*.f6459.0%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    5. Simplified59.0%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(-4, \color{blue}{\left(a \cdot t + i \cdot x\right)}\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{+.f64}\left(\left(a \cdot t\right), \color{blue}{\left(i \cdot x\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, t\right), \left(x \cdot \color{blue}{i}\right)\right)\right) \]
      8. *-lowering-*.f6455.2%

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, t\right), \mathsf{*.f64}\left(x, \color{blue}{i}\right)\right)\right) \]
    8. Simplified55.2%

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

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

Alternative 10: 35.7% accurate, 1.2× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 b c) < -1.09999999999999999e111 or 2.45e144 < (*.f64 b c)

    1. Initial program 86.1%

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

      \[\leadsto \color{blue}{b \cdot c} \]
    4. Step-by-step derivation
      1. *-lowering-*.f6456.4%

        \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{c}\right) \]
    5. Simplified56.4%

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

    if -1.09999999999999999e111 < (*.f64 b c) < 7.5e16

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

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

        \[\leadsto \mathsf{*.f64}\left(-4, \color{blue}{\left(a \cdot t\right)}\right) \]
      2. *-lowering-*.f6430.6%

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, \color{blue}{t}\right)\right) \]
    5. Simplified30.6%

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

    if 7.5e16 < (*.f64 b c) < 2.45e144

    1. Initial program 96.3%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(-4, \left(x \cdot \color{blue}{i}\right)\right) \]
      3. *-lowering-*.f6440.5%

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(x, \color{blue}{i}\right)\right) \]
    5. Simplified40.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -1.1 \cdot 10^{+111}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 7.5 \cdot 10^{+16}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{elif}\;b \cdot c \leq 2.45 \cdot 10^{+144}:\\ \;\;\;\;-4 \cdot \left(x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 67.7% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;i \leq -9 \cdot 10^{-39}:\\
\;\;\;\;\left(t\_1 - i \cdot \left(x \cdot 4\right)\right) - \left(j \cdot 27\right) \cdot k\\

\mathbf{elif}\;i \leq 0.0265:\\
\;\;\;\;b \cdot c + \left(t\_1 + t\_2\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -9.0000000000000002e-39

    1. Initial program 86.3%

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
      2. *-lowering-*.f6477.7%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    5. Simplified77.7%

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

    if -9.0000000000000002e-39 < i < 0.0264999999999999993

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(j, \mathsf{*.f64}\left(k, -27\right)\right), \mathsf{*.f64}\left(-4, \color{blue}{\left(a \cdot t\right)}\right)\right)\right) \]
      18. *-lowering-*.f6474.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(j, \mathsf{*.f64}\left(k, -27\right)\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, \color{blue}{t}\right)\right)\right)\right) \]
    5. Simplified74.0%

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

    if 0.0264999999999999993 < i

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \left(x \cdot i\right)\right), \left(-27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(x, i\right)\right), \left(-27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      13. *-commutativeN/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(x, i\right)\right), \left(j \cdot \left(-27 \cdot \color{blue}{k}\right)\right)\right)\right) \]
      16. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(x, i\right)\right), \mathsf{*.f64}\left(j, \left(k \cdot \color{blue}{-27}\right)\right)\right)\right) \]
      18. *-lowering-*.f6475.2%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(x, i\right)\right), \mathsf{*.f64}\left(j, \mathsf{*.f64}\left(k, \color{blue}{-27}\right)\right)\right)\right) \]
    5. Simplified75.2%

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

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

Alternative 12: 67.6% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if i < -2.00000000000000018e106

    1. Initial program 89.5%

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
      2. *-lowering-*.f6486.7%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    5. Simplified86.7%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(t \cdot \left(-4 \cdot a + -4 \cdot \frac{i \cdot x}{t}\right)\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    7. Step-by-step derivation
      1. distribute-lft-outN/A

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

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(-4 \cdot t\right), \left(a + \frac{i \cdot x}{t}\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-4, t\right), \left(a + \frac{i \cdot x}{t}\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-4, t\right), \mathsf{+.f64}\left(a, \left(\frac{i \cdot x}{t}\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, \color{blue}{27}\right), k\right)\right) \]
      7. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-4, t\right), \mathsf{+.f64}\left(a, \mathsf{/.f64}\left(\left(x \cdot i\right), t\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
      9. *-lowering-*.f6486.8%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-4, t\right), \mathsf{+.f64}\left(a, \mathsf{/.f64}\left(\mathsf{*.f64}\left(x, i\right), t\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    8. Simplified86.8%

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

    if -2.00000000000000018e106 < i < 0.25

    1. Initial program 91.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(j, \mathsf{*.f64}\left(k, -27\right)\right), \mathsf{*.f64}\left(-4, \color{blue}{\left(a \cdot t\right)}\right)\right)\right) \]
      18. *-lowering-*.f6472.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(j, \mathsf{*.f64}\left(k, -27\right)\right), \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, \color{blue}{t}\right)\right)\right)\right) \]
    5. Simplified72.0%

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

    if 0.25 < i

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \left(x \cdot i\right)\right), \left(-27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(x, i\right)\right), \left(-27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      13. *-commutativeN/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(x, i\right)\right), \left(j \cdot \left(-27 \cdot \color{blue}{k}\right)\right)\right)\right) \]
      16. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(x, i\right)\right), \mathsf{*.f64}\left(j, \left(k \cdot \color{blue}{-27}\right)\right)\right)\right) \]
      18. *-lowering-*.f6475.2%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(x, i\right)\right), \mathsf{*.f64}\left(j, \mathsf{*.f64}\left(k, \color{blue}{-27}\right)\right)\right)\right) \]
    5. Simplified75.2%

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

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

Alternative 13: 72.7% accurate, 1.2× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -9.5000000000000001e24 or 6.8000000000000001e130 < x

    1. Initial program 80.3%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(x, \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) + -4 \cdot i\right)\right) \]
      4. +-lowering-+.f64N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(\left(y \cdot z\right), 18\right)\right), \left(-4 \cdot i\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), 18\right)\right), \left(-4 \cdot i\right)\right)\right) \]
      10. *-lowering-*.f6469.1%

        \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y, z\right), 18\right)\right), \mathsf{*.f64}\left(-4, \color{blue}{i}\right)\right)\right) \]
    5. Simplified69.1%

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

    if -9.5000000000000001e24 < x < 6.8000000000000001e130

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(j, \mathsf{*.f64}\left(k, -27\right)\right), \mathsf{*.f64}\left(-4, \color{blue}{\left(a \cdot t\right)}\right)\right)\right) \]
      18. *-lowering-*.f6477.9%

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

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

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

Alternative 14: 72.4% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_1 := t \cdot \left(-4 \cdot a + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.4999999999999997e57 or 5.1999999999999996e170 < t

    1. Initial program 92.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 t around inf

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

        \[\leadsto \mathsf{*.f64}\left(t, \color{blue}{\left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - 4 \cdot a\right)}\right) \]
      2. cancel-sign-sub-invN/A

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

        \[\leadsto \mathsf{*.f64}\left(t, \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + -4 \cdot a\right)\right) \]
      4. +-lowering-+.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(18, \mathsf{*.f64}\left(x, \left(y \cdot z\right)\right)\right), \left(-4 \cdot a\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(18, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right)\right), \left(-4 \cdot a\right)\right)\right) \]
      8. *-lowering-*.f6476.1%

        \[\leadsto \mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(18, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right)\right), \mathsf{*.f64}\left(-4, \color{blue}{a}\right)\right)\right) \]
    5. Simplified76.1%

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

    if -9.4999999999999997e57 < t < 5.1999999999999996e170

    1. Initial program 87.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \left(x \cdot i\right)\right), \left(-27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(x, i\right)\right), \left(-27 \cdot \left(j \cdot k\right)\right)\right)\right) \]
      13. *-commutativeN/A

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(x, i\right)\right), \left(j \cdot \left(-27 \cdot \color{blue}{k}\right)\right)\right)\right) \]
      16. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(x, i\right)\right), \mathsf{*.f64}\left(j, \left(k \cdot \color{blue}{-27}\right)\right)\right)\right) \]
      18. *-lowering-*.f6472.0%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(x, i\right)\right), \mathsf{*.f64}\left(j, \mathsf{*.f64}\left(k, \color{blue}{-27}\right)\right)\right)\right) \]
    5. Simplified72.0%

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

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

Alternative 15: 47.5% accurate, 1.6× speedup?

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

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

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

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


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

    1. Initial program 88.3%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(-4 \cdot \left(a \cdot t\right)\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
      2. *-lowering-*.f6449.4%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, \color{blue}{27}\right), k\right)\right) \]
    5. Simplified49.4%

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

    if -5.69999999999999995e-142 < k < 5.50000000000000022e144

    1. Initial program 92.2%

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
      2. *-lowering-*.f6460.3%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    5. Simplified60.3%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(-4, \color{blue}{\left(a \cdot t + i \cdot x\right)}\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{+.f64}\left(\left(a \cdot t\right), \color{blue}{\left(i \cdot x\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, t\right), \left(x \cdot \color{blue}{i}\right)\right)\right) \]
      8. *-lowering-*.f6452.3%

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, t\right), \mathsf{*.f64}\left(x, \color{blue}{i}\right)\right)\right) \]
    8. Simplified52.3%

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

    if 5.50000000000000022e144 < k

    1. Initial program 79.3%

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

      \[\leadsto \mathsf{\_.f64}\left(\color{blue}{\left(b \cdot c\right)}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    4. Step-by-step derivation
      1. *-lowering-*.f6474.3%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, c\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(j, 27\right)}, k\right)\right) \]
    5. Simplified74.3%

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

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

Alternative 16: 38.7% accurate, 1.6× speedup?

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

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

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

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


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

    1. Initial program 87.7%

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

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

        \[\leadsto \mathsf{*.f64}\left(18, \color{blue}{\left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)}\right) \]
      2. *-lowering-*.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(18, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(x, \mathsf{*.f64}\left(y, \color{blue}{z}\right)\right)\right)\right) \]
    5. Simplified32.3%

      \[\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*N/A

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(18, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(x \cdot t\right), z\right), y\right)\right) \]
      7. *-lowering-*.f6432.4%

        \[\leadsto \mathsf{*.f64}\left(18, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(x, t\right), z\right), y\right)\right) \]
    7. Applied egg-rr32.4%

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

    if -1.05e-124 < k < 2.2e149

    1. Initial program 92.5%

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
      2. *-lowering-*.f6461.1%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    5. Simplified61.1%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(-4, \color{blue}{\left(a \cdot t + i \cdot x\right)}\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{+.f64}\left(\left(a \cdot t\right), \color{blue}{\left(i \cdot x\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, t\right), \left(x \cdot \color{blue}{i}\right)\right)\right) \]
      8. *-lowering-*.f6451.9%

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, t\right), \mathsf{*.f64}\left(x, \color{blue}{i}\right)\right)\right) \]
    8. Simplified51.9%

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

    if 2.2e149 < k

    1. Initial program 79.3%

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(j, \left(k \cdot \color{blue}{-27}\right)\right) \]
      6. *-lowering-*.f6460.8%

        \[\leadsto \mathsf{*.f64}\left(j, \mathsf{*.f64}\left(k, \color{blue}{-27}\right)\right) \]
    5. Simplified60.8%

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

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

Alternative 17: 44.2% accurate, 1.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < -3.9999999999999999e35 or 3.0500000000000002e143 < k

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(j, \left(k \cdot \color{blue}{-27}\right)\right) \]
      6. *-lowering-*.f6447.6%

        \[\leadsto \mathsf{*.f64}\left(j, \mathsf{*.f64}\left(k, \color{blue}{-27}\right)\right) \]
    5. Simplified47.6%

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

    if -3.9999999999999999e35 < k < 3.0500000000000002e143

    1. Initial program 90.8%

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

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

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \left(a \cdot t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{j}, 27\right), k\right)\right) \]
      2. *-lowering-*.f6459.2%

        \[\leadsto \mathsf{\_.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, t\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(x, 4\right), i\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(j, 27\right), k\right)\right) \]
    5. Simplified59.2%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(-4, \color{blue}{\left(a \cdot t + i \cdot x\right)}\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{+.f64}\left(\left(a \cdot t\right), \color{blue}{\left(i \cdot x\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, t\right), \left(x \cdot \color{blue}{i}\right)\right)\right) \]
      8. *-lowering-*.f6449.9%

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{+.f64}\left(\mathsf{*.f64}\left(a, t\right), \mathsf{*.f64}\left(x, \color{blue}{i}\right)\right)\right) \]
    8. Simplified49.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -4 \cdot 10^{+35}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;k \leq 3.05 \cdot 10^{+143}:\\ \;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 35.9% accurate, 1.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 b c) < -3.0000000000000002e121 or 1.60000000000000004e145 < (*.f64 b c)

    1. Initial program 86.1%

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

      \[\leadsto \color{blue}{b \cdot c} \]
    4. Step-by-step derivation
      1. *-lowering-*.f6456.4%

        \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{c}\right) \]
    5. Simplified56.4%

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

    if -3.0000000000000002e121 < (*.f64 b c) < 1.60000000000000004e145

    1. Initial program 90.2%

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

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

        \[\leadsto \mathsf{*.f64}\left(-4, \color{blue}{\left(a \cdot t\right)}\right) \]
      2. *-lowering-*.f6428.1%

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, \color{blue}{t}\right)\right) \]
    5. Simplified28.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \cdot c \leq -3 \cdot 10^{+121}:\\ \;\;\;\;b \cdot c\\ \mathbf{elif}\;b \cdot c \leq 1.6 \cdot 10^{+145}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot c\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 31.5% accurate, 2.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < -8.9999999999999998e-26 or 1.06000000000000001e102 < k

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(j, \left(k \cdot \color{blue}{-27}\right)\right) \]
      6. *-lowering-*.f6446.2%

        \[\leadsto \mathsf{*.f64}\left(j, \mathsf{*.f64}\left(k, \color{blue}{-27}\right)\right) \]
    5. Simplified46.2%

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

    if -8.9999999999999998e-26 < k < 1.06000000000000001e102

    1. Initial program 89.9%

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

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

        \[\leadsto \mathsf{*.f64}\left(-4, \color{blue}{\left(a \cdot t\right)}\right) \]
      2. *-lowering-*.f6431.0%

        \[\leadsto \mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(a, \color{blue}{t}\right)\right) \]
    5. Simplified31.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq -9 \cdot 10^{-26}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \mathbf{elif}\;k \leq 1.06 \cdot 10^{+102}:\\ \;\;\;\;-4 \cdot \left(t \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;j \cdot \left(k \cdot -27\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 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 89.1%

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

    \[\leadsto \color{blue}{b \cdot c} \]
  4. Step-by-step derivation
    1. *-lowering-*.f6420.6%

      \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{c}\right) \]
  5. Simplified20.6%

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

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

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

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