\[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 2020128 
(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

random-bits: contract violation expected: Positive-Integer given: 0LC
random-ranges/data/pavpan/nightlies/herbie/separate-biginterval/src/common.rkt1390
sample-multi-bounded/data/pavpan/nightlies/herbie/separate-biginterval/src/points.rkt140
(unnamed)/data/pavpan/nightlies/herbie/separate-biginterval/src/points.rkt1276
prepare-points-intervals/data/pavpan/nightlies/herbie/separate-biginterval/src/points.rkt1340
pred/data/pavpan/nightlies/herbie/separate-biginterval/src/core/regimes.rkt2004
for-loop/data/pavpan/nightlies/herbie/separate-biginterval/src/core/regimes.rkt2309
sindices->spoints/data/pavpan/nightlies/herbie/separate-biginterval/src/core/regimes.rkt1900
f37unknown
get-final-combination/data/pavpan/nightlies/herbie/separate-biginterval/src/mainloop.rkt3900
.../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 2020128 
(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))))))