\[1 - \log \left(1 - \frac{x - y}{1 - y}\right)\]
1 - \log \left(1 - \frac{x - y}{1 - y}\right)
double code(double x, double y) {
	return ((double) (1.0 - ((double) log(((double) (1.0 - ((double) (((double) (x - y)) / ((double) (1.0 - y))))))))));
}

Reproduce

Please include this information when filing a bug report:

herbie shell --seed 2020165 
(FPCore (x y)
  :name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, B"
  :precision binary64

  :herbie-target
  (if (< y -81284752.61947241) (- 1.0 (log (- (/ x (* y y)) (- (/ 1.0 y) (/ x y))))) (if (< y 3.0094271212461764e+25) (log (/ (exp 1.0) (- 1.0 (/ (- x y) (- 1.0 y))))) (- 1.0 (log (- (/ x (* y y)) (- (/ 1.0 y) (/ x y)))))))

  (- 1.0 (log (- 1.0 (/ (- x y) (- 1.0 y))))))

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 y)
  :name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, B"
  :precision binary64

  :herbie-target
  (if (< y -81284752.61947241) (- 1.0 (log (- (/ x (* y y)) (- (/ 1.0 y) (/ x y))))) (if (< y 3.0094271212461764e+25) (log (/ (exp 1.0) (- 1.0 (/ (- x y) (- 1.0 y))))) (- 1.0 (log (- (/ x (* y y)) (- (/ 1.0 y) (/ x y)))))))

  (- 1.0 (log (- 1.0 (/ (- x y) (- 1.0 y))))))