$\left(\left(\left(\left(x \cdot \log x - x\right) - \frac{\log \left(\frac{x}{2 \cdot pi}\right)}{2}\right) + \frac{1}{12 \cdot x}\right) - \frac{1}{360 \cdot {x}^{3}}\right) + \frac{1}{1260 \cdot {x}^{5}}$
\left(\left(\left(\left(x \cdot \log x - x\right) - \frac{\log \left(\frac{x}{2 \cdot pi}\right)}{2}\right) + \frac{1}{12 \cdot x}\right) - \frac{1}{360 \cdot {x}^{3}}\right) + \frac{1}{1260 \cdot {x}^{5}}
double f(double x, double pi) {
double r32482549 = x;
double r32482550 = log(r32482549);
double r32482551 = r32482549 * r32482550;
double r32482552 = r32482551 - r32482549;
double r32482553 = 2.0;
double r32482554 = pi;
double r32482555 = r32482553 * r32482554;
double r32482556 = r32482549 / r32482555;
double r32482557 = log(r32482556);
double r32482558 = r32482557 / r32482553;
double r32482559 = r32482552 - r32482558;
double r32482560 = 1.0;
double r32482561 = 12.0;
double r32482562 = r32482561 * r32482549;
double r32482563 = r32482560 / r32482562;
double r32482564 = r32482559 + r32482563;
double r32482565 = 360.0;
double r32482566 = 3.0;
double r32482567 = pow(r32482549, r32482566);
double r32482568 = r32482565 * r32482567;
double r32482569 = r32482560 / r32482568;
double r32482570 = r32482564 - r32482569;
double r32482571 = 1260.0;
double r32482572 = 5.0;
double r32482573 = pow(r32482549, r32482572);
double r32482574 = r32482571 * r32482573;
double r32482575 = r32482560 / r32482574;
double r32482576 = r32482570 + r32482575;
return r32482576;
}



# Reproduce

Please include this information when filing a bug report:

herbie shell --seed 1
(FPCore (x pi)
:name "x*log(x) - x - log(x/(2*pi))/2 + 1/(12*x) - 1/(360*pow(x,3)) + 1/(1260*pow(x,5))"
(+ (- (+ (- (- (* x (log x)) x) (/ (log (/ x (* 2.0 pi))) 2.0)) (/ 1.0 (* 12.0 x))) (/ 1.0 (* 360.0 (pow x 3.0)))) (/ 1.0 (* 1260.0 (pow x 5.0)))))


# Backtrace

flonum->ordinal: contract violation expected: Float given: +inf.f in: the 1st argument of (-> Float any) contract from: <pkgs>/math-lib/math/private/flonum/flonum-bits.rkt blaming: /var/www/herbie/src/interface.rkt (assuming the contract is correct) at: <pkgs>/math-lib/math/private/flonum/flonum-bits.rkt:9.9LC
raise-blame-error16/opt/racket-7.1/collects/racket/contract/private/blame.rkt3470
(unnamed)/opt/racket-7.1/collects/racket/contract/private/arrow-higher-order.rkt35733
ulp-difference/var/www/herbie/src/float.rkt460
(unnamed)/opt/racket-7.1/collects/racket/private/more-scheme.rkt26128
for-loop/var/www/herbie/src/points.rkt2042
errors/var/www/herbie/src/points.rkt2020
make-alt-table/var/www/herbie/src/core/alt-table.rkt330
(unnamed)/opt/racket-7.1/collects/racket/contract/private/arrow-val-first.rkt38818
setup-prog!34/var/www/herbie/src/mainloop.rkt670
run-improve43/var/www/herbie/src/mainloop.rkt3390
(unnamed)/opt/racket-7.1/collects/racket/private/more-scheme.rkt26128
(unnamed)/opt/racket-7.1/collects/racket/private/more-scheme.rkt26128