\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}
t_1 := \frac{a}{y \cdot x}\\
t_2 := \frac{z}{y \cdot {x}^{2}}\\
\mathbf{if}\;y \leq -3.14888652711073 \cdot 10^{+107}:\\
\;\;\;\;\frac{1}{\left(\frac{1}{x} + t_1\right) - t_2}\\
\mathbf{else}:\\
\;\;\;\;\begin{array}{l}
t_3 := \frac{x \cdot a}{y}\\
\mathbf{if}\;y \leq -7.161012571514077 \cdot 10^{+76}:\\
\;\;\;\;\left(\frac{z}{y} + \left(\frac{x \cdot {a}^{2}}{{y}^{2}} + \left(x + 27464.7644705 \cdot \frac{1}{{y}^{2}}\right)\right)\right) - \left(t_3 + \left(\frac{x \cdot b}{{y}^{2}} + \frac{a \cdot z}{{y}^{2}}\right)\right)\\
\mathbf{elif}\;y \leq -4.2220150941237535 \cdot 10^{+34}:\\
\;\;\;\;\begin{array}{l}
t_4 := {x}^{2} \cdot {y}^{3}\\
t_5 := {x}^{3} \cdot {y}^{3}\\
t_6 := {x}^{2} \cdot {y}^{2}\\
\frac{1}{\left(\frac{{z}^{2}}{{y}^{2} \cdot {x}^{3}} + \left(\frac{b}{x \cdot {y}^{2}} + \left(\frac{1}{x} + \left(t_1 + \left(\frac{c}{x \cdot {y}^{3}} + \left(54929.528941 \cdot \frac{z}{t_5} + \frac{a \cdot {z}^{2}}{t_5}\right)\right)\right)\right)\right)\right) - \left(\frac{z \cdot b}{t_4} + \left(\frac{{z}^{3}}{{y}^{3} \cdot {x}^{4}} + \left(t_2 + \left(\frac{a \cdot z}{t_6} + \left(27464.7644705 \cdot \frac{a}{t_4} + \left(27464.7644705 \cdot \frac{1}{t_6} + 230661.510616 \cdot \frac{1}{t_4}\right)\right)\right)\right)\right)\right)}
\end{array}\\
\mathbf{elif}\;y \leq 1.4777067309723976 \cdot 10^{+58}:\\
\;\;\;\;\frac{y \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(x, y, z\right), 27464.7644705\right), 230661.510616\right) + t}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - t_3\\
\end{array}\\
\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
(let* ((t_1 (/ a (* y x))) (t_2 (/ z (* y (pow x 2.0)))))
(if (<= y -3.14888652711073e+107)
(/ 1.0 (- (+ (/ 1.0 x) t_1) t_2))
(let* ((t_3 (/ (* x a) y)))
(if (<= y -7.161012571514077e+76)
(-
(+
(/ z y)
(+
(/ (* x (pow a 2.0)) (pow y 2.0))
(+ x (* 27464.7644705 (/ 1.0 (pow y 2.0))))))
(+ t_3 (+ (/ (* x b) (pow y 2.0)) (/ (* a z) (pow y 2.0)))))
(if (<= y -4.2220150941237535e+34)
(let* ((t_4 (* (pow x 2.0) (pow y 3.0)))
(t_5 (* (pow x 3.0) (pow y 3.0)))
(t_6 (* (pow x 2.0) (pow y 2.0))))
(/
1.0
(-
(+
(/ (pow z 2.0) (* (pow y 2.0) (pow x 3.0)))
(+
(/ b (* x (pow y 2.0)))
(+
(/ 1.0 x)
(+
t_1
(+
(/ c (* x (pow y 3.0)))
(+
(* 54929.528941 (/ z t_5))
(/ (* a (pow z 2.0)) t_5)))))))
(+
(/ (* z b) t_4)
(+
(/ (pow z 3.0) (* (pow y 3.0) (pow x 4.0)))
(+
t_2
(+
(/ (* a z) t_6)
(+
(* 27464.7644705 (/ a t_4))
(+
(* 27464.7644705 (/ 1.0 t_6))
(* 230661.510616 (/ 1.0 t_4)))))))))))
(if (<= y 1.4777067309723976e+58)
(/
(+
(* y (fma y (fma y (fma x y z) 27464.7644705) 230661.510616))
t)
(fma y (fma y (fma y (+ y a) b) c) i))
(- (+ x (/ z y)) t_3))))))))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 t_1 = a / (y * x);
double t_2 = z / (y * pow(x, 2.0));
double tmp;
if (y <= -3.14888652711073e+107) {
tmp = 1.0 / (((1.0 / x) + t_1) - t_2);
} else {
double t_3 = (x * a) / y;
double tmp_1;
if (y <= -7.161012571514077e+76) {
tmp_1 = ((z / y) + (((x * pow(a, 2.0)) / pow(y, 2.0)) + (x + (27464.7644705 * (1.0 / pow(y, 2.0)))))) - (t_3 + (((x * b) / pow(y, 2.0)) + ((a * z) / pow(y, 2.0))));
} else if (y <= -4.2220150941237535e+34) {
double t_4 = pow(x, 2.0) * pow(y, 3.0);
double t_5 = pow(x, 3.0) * pow(y, 3.0);
double t_6 = pow(x, 2.0) * pow(y, 2.0);
tmp_1 = 1.0 / (((pow(z, 2.0) / (pow(y, 2.0) * pow(x, 3.0))) + ((b / (x * pow(y, 2.0))) + ((1.0 / x) + (t_1 + ((c / (x * pow(y, 3.0))) + ((54929.528941 * (z / t_5)) + ((a * pow(z, 2.0)) / t_5))))))) - (((z * b) / t_4) + ((pow(z, 3.0) / (pow(y, 3.0) * pow(x, 4.0))) + (t_2 + (((a * z) / t_6) + ((27464.7644705 * (a / t_4)) + ((27464.7644705 * (1.0 / t_6)) + (230661.510616 * (1.0 / t_4)))))))));
} else if (y <= 1.4777067309723976e+58) {
tmp_1 = ((y * fma(y, fma(y, fma(x, y, z), 27464.7644705), 230661.510616)) + t) / fma(y, fma(y, fma(y, (y + a), b), c), i);
} else {
tmp_1 = (x + (z / y)) - t_3;
}
tmp = tmp_1;
}
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
if y < -3.1488865271107301e107Initial program 63.7
Simplified63.7
Applied clear-num_binary6463.7
Taylor expanded in y around inf 23.8
if -3.1488865271107301e107 < y < -7.16101257151407655e76Initial program 62.4
Simplified62.4
Taylor expanded in y around inf 35.8
if -7.16101257151407655e76 < y < -4.22201509412375347e34Initial program 46.0
Simplified46.0
Applied clear-num_binary6446.0
Taylor expanded in y around inf 45.1
if -4.22201509412375347e34 < y < 1.4777067309723976e58Initial program 3.2
Simplified3.2
Applied fma-udef_binary643.2
if 1.4777067309723976e58 < y Initial program 62.6
Simplified62.6
Taylor expanded in y around inf 19.5
Final simplification12.1
herbie shell --seed 2022088
(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)))