\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 -5.95739283321287 \cdot 10^{+61} \lor \neg \left(y \leq 1.969901205390635 \cdot 10^{+54}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)\right)}{i + y \cdot \left(c + \left(a \cdot \left(y \cdot y\right) + \left({y}^{3} + y \cdot b\right)\right)\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 (or (<= y -5.95739283321287e+61) (not (<= y 1.969901205390635e+54)))
(- (+ x (/ z y)) (/ (* x a) y))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x))))))))
(+ i (* y (+ c (+ (* a (* y y)) (+ (pow y 3.0) (* y b)))))))))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 <= -5.95739283321287e+61) || !(y <= 1.969901205390635e+54)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + ((a * (y * y)) + (pow(y, 3.0) + (y * b))))));
}
return tmp;
}















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
Results
| Alternative 1 | |
|---|---|
| Error | 11.0 |
| Cost | 2440 |
| Alternative 2 | |
|---|---|
| Error | 13.7 |
| Cost | 2884 |
| Alternative 3 | |
|---|---|
| Error | 14.1 |
| Cost | 2056 |
| Alternative 4 | |
|---|---|
| Error | 16.5 |
| Cost | 2435 |
| Alternative 5 | |
|---|---|
| Error | 17.3 |
| Cost | 1800 |
| Alternative 6 | |
|---|---|
| Error | 25.1 |
| Cost | 1672 |
| Alternative 7 | |
|---|---|
| Error | 28.4 |
| Cost | 1544 |
| Alternative 8 | |
|---|---|
| Error | 29.0 |
| Cost | 1032 |
| Alternative 9 | |
|---|---|
| Error | 32.8 |
| Cost | 834 |
| Alternative 10 | |
|---|---|
| Error | 45.6 |
| Cost | 706 |
| Alternative 11 | |
|---|---|
| Error | 59.3 |
| Cost | 64 |
| Alternative 12 | |
|---|---|
| Error | 61.5 |
| Cost | 64 |

if y < -5.95739283321286985e61 or 1.96990120539063488e54 < y Initial program 62.5
Taylor expanded around inf 19.9
Simplified19.9
Simplified19.9
if -5.95739283321286985e61 < y < 1.96990120539063488e54Initial program 4.7
Taylor expanded around 0 4.7
Simplified4.7
Simplified4.7
Final simplification11.1
herbie shell --seed 2021044
(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)))