Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2

Percentage Accurate: 55.9% → 85.7%
Time: 21.9s
Alternatives: 12
Speedup: 1.6×

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: 55.9% 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: 85.7% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\\ t_2 := y \cdot t\_1\\ t_3 := x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \mathbf{if}\;y \leq -3.25 \cdot 10^{+50}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+22}:\\ \;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(z + y \cdot x\right) + 27464.7644705\right) + 230661.510616\right) + t}{i + t\_2}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+93}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(230661.510616, \frac{1}{x \cdot t\_1}, \frac{t}{x \cdot t\_2} + \left(\frac{y}{x} \cdot \frac{27464.7644705 + y \cdot z}{t\_1} + \frac{{y}^{3}}{t\_1}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1 (+ c (* y (+ b (* y (+ y a))))))
        (t_2 (* y t_1))
        (t_3 (- x (/ (* z (+ -1.0 (/ a y))) y))))
   (if (<= y -3.25e+50)
     t_3
     (if (<= y 9.5e+22)
       (/
        (+
         (* y (+ (* y (+ (* y (+ z (* y x))) 27464.7644705)) 230661.510616))
         t)
        (+ i t_2))
       (if (<= y 1.9e+93)
         (*
          x
          (fma
           230661.510616
           (/ 1.0 (* x t_1))
           (+
            (/ t (* x t_2))
            (+
             (* (/ y x) (/ (+ 27464.7644705 (* y z)) t_1))
             (/ (pow y 3.0) t_1)))))
         t_3)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double t_1 = c + (y * (b + (y * (y + a))));
	double t_2 = y * t_1;
	double t_3 = x - ((z * (-1.0 + (a / y))) / y);
	double tmp;
	if (y <= -3.25e+50) {
		tmp = t_3;
	} else if (y <= 9.5e+22) {
		tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + t_2);
	} else if (y <= 1.9e+93) {
		tmp = x * fma(230661.510616, (1.0 / (x * t_1)), ((t / (x * t_2)) + (((y / x) * ((27464.7644705 + (y * z)) / t_1)) + (pow(y, 3.0) / t_1))));
	} else {
		tmp = t_3;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	t_1 = Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))
	t_2 = Float64(y * t_1)
	t_3 = Float64(x - Float64(Float64(z * Float64(-1.0 + Float64(a / y))) / y))
	tmp = 0.0
	if (y <= -3.25e+50)
		tmp = t_3;
	elseif (y <= 9.5e+22)
		tmp = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(z + Float64(y * x))) + 27464.7644705)) + 230661.510616)) + t) / Float64(i + t_2));
	elseif (y <= 1.9e+93)
		tmp = Float64(x * fma(230661.510616, Float64(1.0 / Float64(x * t_1)), Float64(Float64(t / Float64(x * t_2)) + Float64(Float64(Float64(y / x) * Float64(Float64(27464.7644705 + Float64(y * z)) / t_1)) + Float64((y ^ 3.0) / t_1)))));
	else
		tmp = t_3;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(N[(z * N[(-1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.25e+50], t$95$3, If[LessEqual[y, 9.5e+22], N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(i + t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e+93], N[(x * N[(230661.510616 * N[(1.0 / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(x * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y / x), $MachinePrecision] * N[(N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[Power[y, 3.0], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\\
t_2 := y \cdot t\_1\\
t_3 := x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\
\mathbf{if}\;y \leq -3.25 \cdot 10^{+50}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;y \leq 9.5 \cdot 10^{+22}:\\
\;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(z + y \cdot x\right) + 27464.7644705\right) + 230661.510616\right) + t}{i + t\_2}\\

\mathbf{elif}\;y \leq 1.9 \cdot 10^{+93}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(230661.510616, \frac{1}{x \cdot t\_1}, \frac{t}{x \cdot t\_2} + \left(\frac{y}{x} \cdot \frac{27464.7644705 + y \cdot z}{t\_1} + \frac{{y}^{3}}{t\_1}\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.2500000000000001e50 or 1.8999999999999999e93 < y

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{27464.7644705 - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Taylor expanded in z around inf 71.0%

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

    if -3.2500000000000001e50 < y < 9.49999999999999937e22

    1. Initial program 98.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

    if 9.49999999999999937e22 < y < 1.8999999999999999e93

    1. Initial program 18.5%

      \[\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 inf 34.2%

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

      \[\leadsto \color{blue}{x \cdot \left(230661.510616 \cdot \frac{1}{x \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \left(\frac{t}{x \cdot \left(y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)\right)} + \left(\frac{y \cdot \left(27464.7644705 + y \cdot z\right)}{x \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{{y}^{3}}{c + y \cdot \left(b + y \cdot \left(a + y\right)\right)}\right)\right)\right)} \]
    5. Step-by-step derivation
      1. fma-define67.2%

        \[\leadsto x \cdot \color{blue}{\mathsf{fma}\left(230661.510616, \frac{1}{x \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}, \frac{t}{x \cdot \left(y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)\right)} + \left(\frac{y \cdot \left(27464.7644705 + y \cdot z\right)}{x \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)} + \frac{{y}^{3}}{c + y \cdot \left(b + y \cdot \left(a + y\right)\right)}\right)\right)} \]
      2. times-frac72.7%

        \[\leadsto x \cdot \mathsf{fma}\left(230661.510616, \frac{1}{x \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}, \frac{t}{x \cdot \left(y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)\right)} + \left(\color{blue}{\frac{y}{x} \cdot \frac{27464.7644705 + y \cdot z}{c + y \cdot \left(b + y \cdot \left(a + y\right)\right)}} + \frac{{y}^{3}}{c + y \cdot \left(b + y \cdot \left(a + y\right)\right)}\right)\right) \]
    6. Simplified72.7%

      \[\leadsto \color{blue}{x \cdot \mathsf{fma}\left(230661.510616, \frac{1}{x \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)}, \frac{t}{x \cdot \left(y \cdot \left(c + y \cdot \left(b + y \cdot \left(a + y\right)\right)\right)\right)} + \left(\frac{y}{x} \cdot \frac{27464.7644705 + y \cdot z}{c + y \cdot \left(b + y \cdot \left(a + y\right)\right)} + \frac{{y}^{3}}{c + y \cdot \left(b + y \cdot \left(a + y\right)\right)}\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification84.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.25 \cdot 10^{+50}:\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \mathbf{elif}\;y \leq 9.5 \cdot 10^{+22}:\\ \;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(z + y \cdot x\right) + 27464.7644705\right) + 230661.510616\right) + t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+93}:\\ \;\;\;\;x \cdot \mathsf{fma}\left(230661.510616, \frac{1}{x \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}, \frac{t}{x \cdot \left(y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)\right)} + \left(\frac{y}{x} \cdot \frac{27464.7644705 + y \cdot z}{c + y \cdot \left(b + y \cdot \left(y + a\right)\right)} + \frac{{y}^{3}}{c + y \cdot \left(b + y \cdot \left(y + a\right)\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 83.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot \left(y \cdot \left(y \cdot \left(z + y \cdot x\right) + 27464.7644705\right) + 230661.510616\right) + t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\ \mathbf{if}\;t\_1 \leq 5 \cdot 10^{+286}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (let* ((t_1
         (/
          (+
           (* y (+ (* y (+ (* y (+ z (* y x))) 27464.7644705)) 230661.510616))
           t)
          (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
   (if (<= t_1 5e+286) t_1 (- x (/ (* z (+ -1.0 (/ a y))) 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 * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * (y + a)))))));
	double tmp;
	if (t_1 <= 5e+286) {
		tmp = t_1;
	} else {
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	}
	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) :: t_1
    real(8) :: tmp
    t_1 = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705d0)) + 230661.510616d0)) + t) / (i + (y * (c + (y * (b + (y * (y + a)))))))
    if (t_1 <= 5d+286) then
        tmp = t_1
    else
        tmp = x - ((z * ((-1.0d0) + (a / y))) / y)
    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 t_1 = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * (y + a)))))));
	double tmp;
	if (t_1 <= 5e+286) {
		tmp = t_1;
	} else {
		tmp = x - ((z * (-1.0 + (a / y))) / y);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	t_1 = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * (y + a)))))))
	tmp = 0
	if t_1 <= 5e+286:
		tmp = t_1
	else:
		tmp = x - ((z * (-1.0 + (a / y))) / 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(z + Float64(y * x))) + 27464.7644705)) + 230661.510616)) + t) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a))))))))
	tmp = 0.0
	if (t_1 <= 5e+286)
		tmp = t_1;
	else
		tmp = Float64(x - Float64(Float64(z * Float64(-1.0 + Float64(a / y))) / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	t_1 = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * (y + a)))))));
	tmp = 0.0;
	if (t_1 <= 5e+286)
		tmp = t_1;
	else
		tmp = x - ((z * (-1.0 + (a / y))) / 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[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+286], t$95$1, N[(x - N[(N[(z * N[(-1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{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)) < 5.0000000000000004e286

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

    if 5.0000000000000004e286 < (/.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 2.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 -inf 53.2%

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{27464.7644705 - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Taylor expanded in z around inf 69.2%

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

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

Alternative 3: 81.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+50} \lor \neg \left(y \leq 5 \cdot 10^{+51}\right):\\
\;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{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 \left(y + a\right)\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.29999999999999997e50 or 5e51 < y

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{27464.7644705 - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Taylor expanded in z around inf 69.6%

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

    if -2.29999999999999997e50 < y < 5e51

    1. Initial program 93.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 x around 0 89.0%

      \[\leadsto \frac{\left(\left(\color{blue}{y \cdot z} + 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} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification79.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.3 \cdot 10^{+50} \lor \neg \left(y \leq 5 \cdot 10^{+51}\right):\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{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 \left(y + a\right)\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 77.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.6 \cdot 10^{+48} \lor \neg \left(y \leq 15000000000000\right):\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{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 -3.6e+48) (not (<= y 15000000000000.0)))
   (- x (/ (* z (+ -1.0 (/ a y))) 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 <= -3.6e+48) || !(y <= 15000000000000.0)) {
		tmp = x - ((z * (-1.0 + (a / y))) / 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 <= (-3.6d+48)) .or. (.not. (y <= 15000000000000.0d0))) then
        tmp = x - ((z * ((-1.0d0) + (a / y))) / 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 <= -3.6e+48) || !(y <= 15000000000000.0)) {
		tmp = x - ((z * (-1.0 + (a / y))) / 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 <= -3.6e+48) or not (y <= 15000000000000.0):
		tmp = x - ((z * (-1.0 + (a / y))) / 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 <= -3.6e+48) || !(y <= 15000000000000.0))
		tmp = Float64(x - Float64(Float64(z * Float64(-1.0 + Float64(a / y))) / 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 <= -3.6e+48) || ~((y <= 15000000000000.0)))
		tmp = x - ((z * (-1.0 + (a / y))) / 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, -3.6e+48], N[Not[LessEqual[y, 15000000000000.0]], $MachinePrecision]], N[(x - N[(N[(z * N[(-1.0 + N[(a / y), $MachinePrecision]), $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 -3.6 \cdot 10^{+48} \lor \neg \left(y \leq 15000000000000\right):\\
\;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{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 < -3.59999999999999983e48 or 1.5e13 < y

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{27464.7644705 - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Taylor expanded in z around inf 65.3%

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

    if -3.59999999999999983e48 < y < 1.5e13

    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 x around 0 95.7%

      \[\leadsto \frac{\left(\left(\color{blue}{y \cdot z} + 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} \]
    4. Taylor expanded in y around 0 89.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.6 \cdot 10^{+48} \lor \neg \left(y \leq 15000000000000\right):\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{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 5: 75.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+43} \lor \neg \left(y \leq 9.2 \cdot 10^{+21}\right):\\
\;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.2000000000000002e43 or 9.2e21 < y

    1. Initial program 5.1%

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{27464.7644705 - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Taylor expanded in z around inf 65.8%

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

    if -7.2000000000000002e43 < y < 9.2e21

    1. Initial program 98.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 0 85.8%

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

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

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

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

Alternative 6: 74.3% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.35 \cdot 10^{+40} \lor \neg \left(y \leq 3.65 \cdot 10^{+19}\right):\\ \;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{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.35e+40) (not (<= y 3.65e+19)))
   (- x (/ (* z (+ -1.0 (/ a y))) 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.35e+40) || !(y <= 3.65e+19)) {
		tmp = x - ((z * (-1.0 + (a / y))) / 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.35d+40)) .or. (.not. (y <= 3.65d+19))) then
        tmp = x - ((z * ((-1.0d0) + (a / y))) / 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.35e+40) || !(y <= 3.65e+19)) {
		tmp = x - ((z * (-1.0 + (a / y))) / 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.35e+40) or not (y <= 3.65e+19):
		tmp = x - ((z * (-1.0 + (a / y))) / 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.35e+40) || !(y <= 3.65e+19))
		tmp = Float64(x - Float64(Float64(z * Float64(-1.0 + Float64(a / y))) / 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.35e+40) || ~((y <= 3.65e+19)))
		tmp = x - ((z * (-1.0 + (a / y))) / 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.35e+40], N[Not[LessEqual[y, 3.65e+19]], $MachinePrecision]], N[(x - N[(N[(z * N[(-1.0 + N[(a / y), $MachinePrecision]), $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.35 \cdot 10^{+40} \lor \neg \left(y \leq 3.65 \cdot 10^{+19}\right):\\
\;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{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.35000000000000005e40 or 3.65e19 < y

    1. Initial program 5.1%

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{27464.7644705 - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Taylor expanded in z around inf 65.8%

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

    if -1.35000000000000005e40 < y < 3.65e19

    1. Initial program 98.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 0 85.8%

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

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

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

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

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

Alternative 7: 70.8% accurate, 1.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.7999999999999998e37 or 1.55e10 < y

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{\left(-1 \cdot z + -1 \cdot \frac{27464.7644705 - \left(-1 \cdot \left(a \cdot \left(-1 \cdot z - -1 \cdot \left(a \cdot x\right)\right)\right) + b \cdot x\right)}{y}\right) - -1 \cdot \left(a \cdot x\right)}{y}} \]
    4. Taylor expanded in z around inf 65.3%

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

    if -2.7999999999999998e37 < y < 1.55e10

    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 86.5%

      \[\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. *-commutative86.5%

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

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

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

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

Alternative 8: 70.7% accurate, 1.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.00000000000000001e41 or 1.02e11 < y

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

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

        \[\leadsto \color{blue}{x + \left(\frac{z}{y} - \frac{a \cdot x}{y}\right)} \]
      2. associate-/l*65.0%

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

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

    if -2.00000000000000001e41 < y < 1.02e11

    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 86.5%

      \[\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. *-commutative86.5%

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

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

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

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

Alternative 9: 61.1% accurate, 1.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.75e21 or 4.00000000000000015e-10 < y

    1. Initial program 8.4%

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

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

        \[\leadsto \color{blue}{x + \left(\frac{z}{y} - \frac{a \cdot x}{y}\right)} \]
      2. associate-/l*62.8%

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

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

    if -1.75e21 < y < 4.00000000000000015e-10

    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 88.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. *-commutative88.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. Simplified88.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} \]
    6. Taylor expanded in i around inf 58.7%

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

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

Alternative 10: 53.9% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+49}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+39}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= y -8e+49) x (if (<= y 4e+39) (/ (+ t (* y 230661.510616)) i) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= -8e+49) {
		tmp = x;
	} else if (y <= 4e+39) {
		tmp = (t + (y * 230661.510616)) / i;
	} else {
		tmp = x;
	}
	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 <= (-8d+49)) then
        tmp = x
    else if (y <= 4d+39) then
        tmp = (t + (y * 230661.510616d0)) / i
    else
        tmp = x
    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 <= -8e+49) {
		tmp = x;
	} else if (y <= 4e+39) {
		tmp = (t + (y * 230661.510616)) / i;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if y <= -8e+49:
		tmp = x
	elif y <= 4e+39:
		tmp = (t + (y * 230661.510616)) / i
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (y <= -8e+49)
		tmp = x;
	elseif (y <= 4e+39)
		tmp = Float64(Float64(t + Float64(y * 230661.510616)) / i);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (y <= -8e+49)
		tmp = x;
	elseif (y <= 4e+39)
		tmp = (t + (y * 230661.510616)) / i;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -8e+49], x, If[LessEqual[y, 4e+39], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+49}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 4 \cdot 10^{+39}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.99999999999999957e49 or 3.99999999999999976e39 < y

    1. Initial program 3.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 inf 54.3%

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

    if -7.99999999999999957e49 < y < 3.99999999999999976e39

    1. Initial program 95.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 0 82.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+49}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+39}:\\ \;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 50.6% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+22}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.22 \cdot 10^{+30}:\\ \;\;\;\;\frac{t}{i}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= y -1.7e+22) x (if (<= y 1.22e+30) (/ t i) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= -1.7e+22) {
		tmp = x;
	} else if (y <= 1.22e+30) {
		tmp = t / i;
	} else {
		tmp = x;
	}
	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+22)) then
        tmp = x
    else if (y <= 1.22d+30) then
        tmp = t / i
    else
        tmp = x
    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+22) {
		tmp = x;
	} else if (y <= 1.22e+30) {
		tmp = t / i;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c, i):
	tmp = 0
	if y <= -1.7e+22:
		tmp = x
	elif y <= 1.22e+30:
		tmp = t / i
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (y <= -1.7e+22)
		tmp = x;
	elseif (y <= 1.22e+30)
		tmp = Float64(t / i);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c, i)
	tmp = 0.0;
	if (y <= -1.7e+22)
		tmp = x;
	elseif (y <= 1.22e+30)
		tmp = t / i;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.7e+22], x, If[LessEqual[y, 1.22e+30], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+22}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.22 \cdot 10^{+30}:\\
\;\;\;\;\frac{t}{i}\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.7e22 or 1.22e30 < y

    1. Initial program 5.1%

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

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

    if -1.7e22 < y < 1.22e30

    1. Initial program 97.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 y around 0 51.0%

      \[\leadsto \color{blue}{\frac{t}{i}} \]
  3. Recombined 2 regimes into one program.
  4. 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 50.1%

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

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

Reproduce

?
herbie shell --seed 2024163 
(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)))