Average Error: 28.8 → 11.0
Time: 35.8s
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 -8.758407785881581 \cdot 10^{+54} \lor \neg \left(y \leq 1.2568926494090495 \cdot 10^{+84}\right):\\ \;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \left(y \cdot \left(\left(y \cdot z + x \cdot \left(y \cdot y\right)\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}\\ \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 -8.758407785881581 \cdot 10^{+54} \lor \neg \left(y \leq 1.2568926494090495 \cdot 10^{+84}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\

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


\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 (or (<= y -8.758407785881581e+54) (not (<= y 1.2568926494090495e+84)))
   (- (+ x (/ z y)) (/ (* x a) y))
   (/
    (+
     (* y (+ (* y (+ (+ (* y z) (* x (* y y))) 27464.7644705)) 230661.510616))
     t)
    (+ (* 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) {
	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 <= -8.758407785881581e+54) || !(y <= 1.2568926494090495e+84)) {
		tmp = (x + (z / y)) - ((x * a) / y);
	} else {
		tmp = ((y * ((y * (((y * z) + (x * (y * y))) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
	}
	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 2 regimes
  2. if y < -8.758407785881581e54 or 1.25689264940904951e84 < y

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

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

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

    if -8.758407785881581e54 < y < 1.25689264940904951e84

    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. Taylor expanded around 0 6.2

      \[\leadsto \frac{\left(\left(\color{blue}{\left(y \cdot z + {y}^{2} \cdot x\right)} + 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. Simplified6.2

      \[\leadsto \frac{\left(\left(\color{blue}{\left(y \cdot z + \left(y \cdot y\right) \cdot x\right)} + 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 simplification11.0

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.758407785881581 \cdot 10^{+54} \lor \neg \left(y \leq 1.2568926494090495 \cdot 10^{+84}\right):\\ \;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot \left(y \cdot \left(\left(y \cdot z + x \cdot \left(y \cdot y\right)\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}\\ \end{array} \]

Reproduce

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