Average Error: 28.6 → 9.2
Time: 4.4min
Precision: binary64
\[\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}\]
\[\begin{array}{l} \mathbf{if}\;y \leq -1.5366475830180087 \cdot 10^{+60}:\\ \;\;\;\;x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\ \mathbf{elif}\;y \leq 6.42069951733776 \cdot 10^{+59}:\\ \;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(z + y \cdot x\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 + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \end{array}\]
\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}
\begin{array}{l}
\mathbf{if}\;y \leq -1.5366475830180087 \cdot 10^{+60}:\\
\;\;\;\;x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\

\mathbf{elif}\;y \leq 6.42069951733776 \cdot 10^{+59}:\\
\;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(z + y \cdot x\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 + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\

\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)))
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= y -1.5366475830180087e+60)
   (+ x (- (/ z y) (* x (/ a y))))
   (if (<= y 6.42069951733776e+59)
     (/
      (+ (* y (+ (* y (+ (* y (+ z (* y x))) 27464.7644705)) 230661.510616)) t)
      (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
     (+ x (- (/ z y) (/ a (/ y x)))))))
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);
}
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if (y <= -1.5366475830180087e+60) {
		tmp = x + ((z / y) - (x * (a / y)));
	} else if (y <= 6.42069951733776e+59) {
		tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
	} else {
		tmp = x + ((z / y) - (a / (y / x)));
	}
	return tmp;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus i

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if y < -1.5366475830180087e60

    1. Initial program 62.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. Taylor expanded around inf 20.0

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

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

    if -1.5366475830180087e60 < y < 6.4206995173377602e59

    1. Initial program 4.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}\]

    if 6.4206995173377602e59 < y

    1. Initial program 62.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. Taylor expanded around inf 18.8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.5366475830180087 \cdot 10^{+60}:\\ \;\;\;\;x + \left(\frac{z}{y} - x \cdot \frac{a}{y}\right)\\ \mathbf{elif}\;y \leq 6.42069951733776 \cdot 10^{+59}:\\ \;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(z + y \cdot x\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 + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\ \end{array}\]

Reproduce

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