Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2

Percentage Accurate: 56.0% → 81.5%
Time: 20.1s
Alternatives: 12
Speedup: 1.9×

Specification

?
\[\begin{array}{l} \\ \frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (/
  (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t)
  (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
    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
    code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i):
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\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 12 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: 56.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (/
  (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t)
  (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
    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
    code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i):
	return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i)
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i))
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}

Alternative 1: 81.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+54} \lor \neg \left(y \leq 1.96 \cdot 10^{+15}\right):\\
\;\;\;\;x + \frac{z - x \cdot a}{y}\\

\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot a\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.19999999999999935e54 or 1.96e15 < y

    1. Initial program 2.2%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 70.9%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-neg70.9%

        \[\leadsto x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)} \]
      2. unsub-neg70.9%

        \[\leadsto \color{blue}{x - \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. sub-neg70.9%

        \[\leadsto x - \frac{\color{blue}{-1 \cdot z + \left(--1 \cdot \left(a \cdot x\right)\right)}}{y} \]
      4. mul-1-neg70.9%

        \[\leadsto x - \frac{\color{blue}{\left(-z\right)} + \left(--1 \cdot \left(a \cdot x\right)\right)}{y} \]
      5. mul-1-neg70.9%

        \[\leadsto x - \frac{\left(-z\right) + \left(-\color{blue}{\left(-a \cdot x\right)}\right)}{y} \]
      6. remove-double-neg70.9%

        \[\leadsto x - \frac{\left(-z\right) + \color{blue}{a \cdot x}}{y} \]
    5. Simplified70.9%

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

    if -8.19999999999999935e54 < y < 1.96e15

    1. Initial program 97.0%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 97.0%

      \[\leadsto \frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\color{blue}{y \cdot \left(b + a \cdot y\right)} + c\right) \cdot y + i} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification85.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.2 \cdot 10^{+54} \lor \neg \left(y \leq 1.96 \cdot 10^{+15}\right):\\ \;\;\;\;x + \frac{z - x \cdot a}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot a\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 82.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i\\ t_2 := y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right)\\ \mathbf{if}\;\frac{t\_2 + t}{t\_1} \leq \infty:\\ \;\;\;\;\frac{t}{t\_1} + \frac{t\_2}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - x \cdot a}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
        (t_2
         (* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))))
   (if (<= (/ (+ t_2 t) t_1) INFINITY)
     (+ (/ t t_1) (/ t_2 t_1))
     (+ x (/ (- z (* x a)) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
	double t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616);
	double tmp;
	if (((t_2 + t) / t_1) <= ((double) INFINITY)) {
		tmp = (t / t_1) + (t_2 / t_1);
	} else {
		tmp = x + ((z - (x * a)) / y);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
	double t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616);
	double tmp;
	if (((t_2 + t) / t_1) <= Double.POSITIVE_INFINITY) {
		tmp = (t / t_1) + (t_2 / t_1);
	} else {
		tmp = x + ((z - (x * a)) / y);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i
	t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)
	tmp = 0
	if ((t_2 + t) / t_1) <= math.inf:
		tmp = (t / t_1) + (t_2 / t_1)
	else:
		tmp = x + ((z - (x * a)) / y)
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)
	t_2 = Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616))
	tmp = 0.0
	if (Float64(Float64(t_2 + t) / t_1) <= Inf)
		tmp = Float64(Float64(t / t_1) + Float64(t_2 / t_1));
	else
		tmp = Float64(x + Float64(Float64(z - Float64(x * a)) / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = (y * ((y * ((y * (y + a)) + b)) + c)) + i;
	t_2 = y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616);
	tmp = 0.0;
	if (((t_2 + t) / t_1) <= Inf)
		tmp = (t / t_1) + (t_2 / t_1);
	else
		tmp = x + ((z - (x * a)) / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(t$95$2 + t), $MachinePrecision] / t$95$1), $MachinePrecision], Infinity], N[(N[(t / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - N[(x * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i\\
t_2 := y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right)\\
\mathbf{if}\;\frac{t\_2 + t}{t\_1} \leq \infty:\\
\;\;\;\;\frac{t}{t\_1} + \frac{t\_2}{t\_1}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{z - x \cdot a}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0

    1. Initial program 91.6%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0 91.6%

      \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + x \cdot y\right)\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]

    if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i))

    1. Initial program 0.0%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 72.9%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-neg72.9%

        \[\leadsto x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)} \]
      2. unsub-neg72.9%

        \[\leadsto \color{blue}{x - \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. sub-neg72.9%

        \[\leadsto x - \frac{\color{blue}{-1 \cdot z + \left(--1 \cdot \left(a \cdot x\right)\right)}}{y} \]
      4. mul-1-neg72.9%

        \[\leadsto x - \frac{\color{blue}{\left(-z\right)} + \left(--1 \cdot \left(a \cdot x\right)\right)}{y} \]
      5. mul-1-neg72.9%

        \[\leadsto x - \frac{\left(-z\right) + \left(-\color{blue}{\left(-a \cdot x\right)}\right)}{y} \]
      6. remove-double-neg72.9%

        \[\leadsto x - \frac{\left(-z\right) + \color{blue}{a \cdot x}}{y} \]
    5. Simplified72.9%

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

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

Alternative 3: 82.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\ \mathbf{if}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z - x \cdot a}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1
         (/
          (+
           (* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
           t)
          (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
   (if (<= t_1 INFINITY) t_1 (+ x (/ (- z (* x a)) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
	double tmp;
	if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = x + ((z - (x * a)) / y);
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
	double tmp;
	if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = x + ((z - (x * a)) / y);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
	tmp = 0
	if t_1 <= math.inf:
		tmp = t_1
	else:
		tmp = x + ((z - (x * a)) / y)
	return tmp
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i))
	tmp = 0.0
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(x + Float64(Float64(z - Float64(x * a)) / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
	tmp = 0.0;
	if (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = x + ((z - (x * a)) / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x + N[(N[(z - N[(x * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x + \frac{z - x \cdot a}{y}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0

    1. Initial program 91.6%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing

    if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i))

    1. Initial program 0.0%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 72.9%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-neg72.9%

        \[\leadsto x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)} \]
      2. unsub-neg72.9%

        \[\leadsto \color{blue}{x - \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. sub-neg72.9%

        \[\leadsto x - \frac{\color{blue}{-1 \cdot z + \left(--1 \cdot \left(a \cdot x\right)\right)}}{y} \]
      4. mul-1-neg72.9%

        \[\leadsto x - \frac{\color{blue}{\left(-z\right)} + \left(--1 \cdot \left(a \cdot x\right)\right)}{y} \]
      5. mul-1-neg72.9%

        \[\leadsto x - \frac{\left(-z\right) + \left(-\color{blue}{\left(-a \cdot x\right)}\right)}{y} \]
      6. remove-double-neg72.9%

        \[\leadsto x - \frac{\left(-z\right) + \color{blue}{a \cdot x}}{y} \]
    5. Simplified72.9%

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

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

Alternative 4: 78.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+36} \lor \neg \left(y \leq 1.96 \cdot 10^{+15}\right):\\
\;\;\;\;x + \frac{z - x \cdot a}{y}\\

\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot a\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.50000000000000014e36 or 1.96e15 < y

    1. Initial program 3.0%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 68.7%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-neg68.7%

        \[\leadsto x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)} \]
      2. unsub-neg68.7%

        \[\leadsto \color{blue}{x - \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. sub-neg68.7%

        \[\leadsto x - \frac{\color{blue}{-1 \cdot z + \left(--1 \cdot \left(a \cdot x\right)\right)}}{y} \]
      4. mul-1-neg68.7%

        \[\leadsto x - \frac{\color{blue}{\left(-z\right)} + \left(--1 \cdot \left(a \cdot x\right)\right)}{y} \]
      5. mul-1-neg68.7%

        \[\leadsto x - \frac{\left(-z\right) + \left(-\color{blue}{\left(-a \cdot x\right)}\right)}{y} \]
      6. remove-double-neg68.7%

        \[\leadsto x - \frac{\left(-z\right) + \color{blue}{a \cdot x}}{y} \]
    5. Simplified68.7%

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

    if -8.50000000000000014e36 < y < 1.96e15

    1. Initial program 99.0%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 94.1%

      \[\leadsto \frac{\left(\color{blue}{y \cdot \left(27464.7644705 + y \cdot z\right)} + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    4. Taylor expanded in y around 0 94.1%

      \[\leadsto \frac{\left(y \cdot \left(27464.7644705 + y \cdot z\right) + 230661.510616\right) \cdot y + t}{\left(\color{blue}{y \cdot \left(b + a \cdot y\right)} + c\right) \cdot y + i} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification82.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.5 \cdot 10^{+36} \lor \neg \left(y \leq 1.96 \cdot 10^{+15}\right):\\ \;\;\;\;x + \frac{z - x \cdot a}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot a\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 76.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{+35} \lor \neg \left(y \leq 1.7 \cdot 10^{+15}\right):\\
\;\;\;\;x + \frac{z - x \cdot a}{y}\\

\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot b\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.40000000000000005e35 or 1.7e15 < y

    1. Initial program 3.0%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 68.7%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-neg68.7%

        \[\leadsto x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)} \]
      2. unsub-neg68.7%

        \[\leadsto \color{blue}{x - \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. sub-neg68.7%

        \[\leadsto x - \frac{\color{blue}{-1 \cdot z + \left(--1 \cdot \left(a \cdot x\right)\right)}}{y} \]
      4. mul-1-neg68.7%

        \[\leadsto x - \frac{\color{blue}{\left(-z\right)} + \left(--1 \cdot \left(a \cdot x\right)\right)}{y} \]
      5. mul-1-neg68.7%

        \[\leadsto x - \frac{\left(-z\right) + \left(-\color{blue}{\left(-a \cdot x\right)}\right)}{y} \]
      6. remove-double-neg68.7%

        \[\leadsto x - \frac{\left(-z\right) + \color{blue}{a \cdot x}}{y} \]
    5. Simplified68.7%

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

    if -5.40000000000000005e35 < y < 1.7e15

    1. Initial program 99.0%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 94.1%

      \[\leadsto \frac{\left(\color{blue}{y \cdot \left(27464.7644705 + y \cdot z\right)} + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    4. Taylor expanded in y around 0 88.7%

      \[\leadsto \frac{\left(y \cdot \left(27464.7644705 + y \cdot z\right) + 230661.510616\right) \cdot y + t}{\left(\color{blue}{b \cdot y} + c\right) \cdot y + i} \]
    5. Step-by-step derivation
      1. *-commutative88.7%

        \[\leadsto \frac{\left(y \cdot \left(27464.7644705 + y \cdot z\right) + 230661.510616\right) \cdot y + t}{\left(\color{blue}{y \cdot b} + c\right) \cdot y + i} \]
    6. Simplified88.7%

      \[\leadsto \frac{\left(y \cdot \left(27464.7644705 + y \cdot z\right) + 230661.510616\right) \cdot y + t}{\left(\color{blue}{y \cdot b} + c\right) \cdot y + i} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification79.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.4 \cdot 10^{+35} \lor \neg \left(y \leq 1.7 \cdot 10^{+15}\right):\\ \;\;\;\;x + \frac{z - x \cdot a}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot b\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 75.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.8 \cdot 10^{+36} \lor \neg \left(y \leq 1.96 \cdot 10^{+15}\right):\\
\;\;\;\;x + \frac{z - x \cdot a}{y}\\

\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.80000000000000002e36 or 1.96e15 < y

    1. Initial program 3.0%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 68.7%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-neg68.7%

        \[\leadsto x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)} \]
      2. unsub-neg68.7%

        \[\leadsto \color{blue}{x - \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. sub-neg68.7%

        \[\leadsto x - \frac{\color{blue}{-1 \cdot z + \left(--1 \cdot \left(a \cdot x\right)\right)}}{y} \]
      4. mul-1-neg68.7%

        \[\leadsto x - \frac{\color{blue}{\left(-z\right)} + \left(--1 \cdot \left(a \cdot x\right)\right)}{y} \]
      5. mul-1-neg68.7%

        \[\leadsto x - \frac{\left(-z\right) + \left(-\color{blue}{\left(-a \cdot x\right)}\right)}{y} \]
      6. remove-double-neg68.7%

        \[\leadsto x - \frac{\left(-z\right) + \color{blue}{a \cdot x}}{y} \]
    5. Simplified68.7%

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

    if -8.80000000000000002e36 < y < 1.96e15

    1. Initial program 99.0%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 85.4%

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

        \[\leadsto \frac{\color{blue}{y \cdot 230661.510616} + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    5. Simplified85.4%

      \[\leadsto \frac{\color{blue}{y \cdot 230661.510616} + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification77.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.8 \cdot 10^{+36} \lor \neg \left(y \leq 1.96 \cdot 10^{+15}\right):\\ \;\;\;\;x + \frac{z - x \cdot a}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 73.3% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+34} \lor \neg \left(y \leq 7000000000000\right):\\
\;\;\;\;x + \frac{z - x \cdot a}{y}\\

\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.7e34 or 7e12 < y

    1. Initial program 3.0%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 68.7%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-neg68.7%

        \[\leadsto x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)} \]
      2. unsub-neg68.7%

        \[\leadsto \color{blue}{x - \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. sub-neg68.7%

        \[\leadsto x - \frac{\color{blue}{-1 \cdot z + \left(--1 \cdot \left(a \cdot x\right)\right)}}{y} \]
      4. mul-1-neg68.7%

        \[\leadsto x - \frac{\color{blue}{\left(-z\right)} + \left(--1 \cdot \left(a \cdot x\right)\right)}{y} \]
      5. mul-1-neg68.7%

        \[\leadsto x - \frac{\left(-z\right) + \left(-\color{blue}{\left(-a \cdot x\right)}\right)}{y} \]
      6. remove-double-neg68.7%

        \[\leadsto x - \frac{\left(-z\right) + \color{blue}{a \cdot x}}{y} \]
    5. Simplified68.7%

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

    if -1.7e34 < y < 7e12

    1. Initial program 99.0%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 92.0%

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

        \[\leadsto \frac{\left(y \cdot \left(27464.7644705 + y \cdot z\right) + 230661.510616\right) \cdot y + t}{\left(\color{blue}{y \cdot b} + c\right) \cdot y + i} \]
    5. Simplified92.0%

      \[\leadsto \frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\color{blue}{y \cdot b} + c\right) \cdot y + i} \]
    6. Taylor expanded in y around 0 81.8%

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

        \[\leadsto \frac{\color{blue}{y \cdot 230661.510616} + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    8. Simplified81.8%

      \[\leadsto \frac{\color{blue}{y \cdot 230661.510616} + t}{\left(y \cdot b + c\right) \cdot y + i} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification75.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+34} \lor \neg \left(y \leq 7000000000000\right):\\ \;\;\;\;x + \frac{z - x \cdot a}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 66.6% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{+34} \lor \neg \left(y \leq 270000000000\right):\\
\;\;\;\;x + \frac{z - x \cdot a}{y}\\

\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.5e34 or 2.7e11 < y

    1. Initial program 3.0%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 68.7%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-neg68.7%

        \[\leadsto x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)} \]
      2. unsub-neg68.7%

        \[\leadsto \color{blue}{x - \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. sub-neg68.7%

        \[\leadsto x - \frac{\color{blue}{-1 \cdot z + \left(--1 \cdot \left(a \cdot x\right)\right)}}{y} \]
      4. mul-1-neg68.7%

        \[\leadsto x - \frac{\color{blue}{\left(-z\right)} + \left(--1 \cdot \left(a \cdot x\right)\right)}{y} \]
      5. mul-1-neg68.7%

        \[\leadsto x - \frac{\left(-z\right) + \left(-\color{blue}{\left(-a \cdot x\right)}\right)}{y} \]
      6. remove-double-neg68.7%

        \[\leadsto x - \frac{\left(-z\right) + \color{blue}{a \cdot x}}{y} \]
    5. Simplified68.7%

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

    if -4.5e34 < y < 2.7e11

    1. Initial program 99.0%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 76.3%

      \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    4. Taylor expanded in b around inf 73.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.5 \cdot 10^{+34} \lor \neg \left(y \leq 270000000000\right):\\ \;\;\;\;x + \frac{z - x \cdot a}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 64.0% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+37} \lor \neg \left(y \leq 9500000000000\right):\\
\;\;\;\;x + \frac{z - x \cdot a}{y}\\

\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.5500000000000001e37 or 9.5e12 < y

    1. Initial program 3.0%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 69.2%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Step-by-step derivation
      1. mul-1-neg69.2%

        \[\leadsto x + \color{blue}{\left(-\frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}\right)} \]
      2. unsub-neg69.2%

        \[\leadsto \color{blue}{x - \frac{-1 \cdot z - -1 \cdot \left(a \cdot x\right)}{y}} \]
      3. sub-neg69.2%

        \[\leadsto x - \frac{\color{blue}{-1 \cdot z + \left(--1 \cdot \left(a \cdot x\right)\right)}}{y} \]
      4. mul-1-neg69.2%

        \[\leadsto x - \frac{\color{blue}{\left(-z\right)} + \left(--1 \cdot \left(a \cdot x\right)\right)}{y} \]
      5. mul-1-neg69.2%

        \[\leadsto x - \frac{\left(-z\right) + \left(-\color{blue}{\left(-a \cdot x\right)}\right)}{y} \]
      6. remove-double-neg69.2%

        \[\leadsto x - \frac{\left(-z\right) + \color{blue}{a \cdot x}}{y} \]
    5. Simplified69.2%

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

    if -1.5500000000000001e37 < y < 9.5e12

    1. Initial program 98.3%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 75.8%

      \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    4. Taylor expanded in y around 0 65.4%

      \[\leadsto \frac{t}{i + \color{blue}{c \cdot y}} \]
    5. Step-by-step derivation
      1. *-commutative65.4%

        \[\leadsto \frac{t}{i + \color{blue}{y \cdot c}} \]
    6. Simplified65.4%

      \[\leadsto \frac{t}{i + \color{blue}{y \cdot c}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification67.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{+37} \lor \neg \left(y \leq 9500000000000\right):\\ \;\;\;\;x + \frac{z - x \cdot a}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{i + y \cdot c}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 59.0% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+15} \lor \neg \left(y \leq 6 \cdot 10^{+14}\right):\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot c}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.2e15 or 6e14 < y

    1. Initial program 6.2%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 59.8%

      \[\leadsto \color{blue}{x} \]

    if -4.2e15 < y < 6e14

    1. Initial program 99.0%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 78.5%

      \[\leadsto \color{blue}{\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}} \]
    4. Taylor expanded in y around 0 67.7%

      \[\leadsto \frac{t}{i + \color{blue}{c \cdot y}} \]
    5. Step-by-step derivation
      1. *-commutative67.7%

        \[\leadsto \frac{t}{i + \color{blue}{y \cdot c}} \]
    6. Simplified67.7%

      \[\leadsto \frac{t}{i + \color{blue}{y \cdot c}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification63.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.2 \cdot 10^{+15} \lor \neg \left(y \leq 6 \cdot 10^{+14}\right):\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{i + y \cdot c}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 51.4% accurate, 2.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.8 \cdot 10^{-20} \lor \neg \left(y \leq 740000000000\right):\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;\frac{t}{i}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.8000000000000003e-20 or 7.4e11 < y

    1. Initial program 9.9%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 57.2%

      \[\leadsto \color{blue}{x} \]

    if -9.8000000000000003e-20 < y < 7.4e11

    1. Initial program 99.7%

      \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 58.5%

      \[\leadsto \color{blue}{\frac{t}{i}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification57.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.8 \cdot 10^{-20} \lor \neg \left(y \leq 740000000000\right):\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{i}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 26.0% accurate, 33.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a b c i) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return x;
}
real(8) function code(x, y, z, t, a, b, c, i)
    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
    code = x
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	return x;
}
def code(x, y, z, t, a, b, c, i):
	return x
function code(x, y, z, t, a, b, c, i)
	return x
end
function tmp = code(x, y, z, t, a, b, c, i)
	tmp = x;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 54.8%

    \[\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i} \]
  2. Add Preprocessing
  3. Taylor expanded in y around inf 30.2%

    \[\leadsto \color{blue}{x} \]
  4. Add Preprocessing

Reproduce

?
herbie shell --seed 2024096 
(FPCore (x y z t a b c i)
  :name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2"
  :precision binary64
  (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))