\[-0.0259999999999999988 \lt x \land x \lt 0.0259999999999999988\]
\[\frac{1}{x} - \frac{1}{\tan x}\]
\frac{1}{x} - \frac{1}{\tan x}
double code(double x) {
	return ((double) (((double) (1.0 / x)) - ((double) (1.0 / ((double) tan(x))))));
}

Reproduce

Please include this information when filing a bug report:

herbie shell --seed 2020165 
(FPCore (x)
  :name "invcot (example 3.9)"
  :precision binary64
  :pre (and (< -0.026 x) (< x 0.026))

  :herbie-target
  (if (< (fabs x) 0.026) (* (/ x 3.0) (+ 1.0 (/ (* x x) 15.0))) (- (/ 1.0 x) (/ 1.0 (tan x))))

  (- (/ 1.0 x) (/ 1.0 (tan x))))

Backtrace

ival-hi: contract violation expected: ival? given: #<procedure:interval>LC
for-loop/data/pavpan/nightlies/herbie/ival-find-range/src/sampling.rkt3711
hyperrect-weight/data/pavpan/nightlies/herbie/ival-find-range/src/sampling.rkt360
total-weight/data/pavpan/nightlies/herbie/ival-find-range/src/sampling.rkt1132
log-space-improvement/data/pavpan/nightlies/herbie/ival-find-range/src/sampling.rkt1100
(unnamed)/opt/racket-7.5/collects/racket/contract/private/arrow-higher-order.rkt37533
get-hyperrects/data/pavpan/nightlies/herbie/ival-find-range/src/sampling.rkt1230
make-sampler/data/pavpan/nightlies/herbie/ival-find-range/src/sampling.rkt1470
prepare-points-intervals/data/pavpan/nightlies/herbie/ival-find-range/src/points.rkt900
run-improve47/data/pavpan/nightlies/herbie/ival-find-range/src/mainloop.rkt3650
.../more-scheme.rkt:261:28unknown
run/opt/racket-7.5/share/pkgs/profile-lib/main.rkt392
profile-thunk16/opt/racket-7.5/share/pkgs/profile-lib/main.rkt90
(unnamed)/opt/racket-7.5/collects/racket/private/more-scheme.rkt26128

Reproduce

herbie shell --seed 2020165 
(FPCore (x)
  :name "invcot (example 3.9)"
  :precision binary64
  :pre (and (< -0.026 x) (< x 0.026))

  :herbie-target
  (if (< (fabs x) 0.026) (* (/ x 3.0) (+ 1.0 (/ (* x x) 15.0))) (- (/ 1.0 x) (/ 1.0 (tan x))))

  (- (/ 1.0 x) (/ 1.0 (tan x))))