\frac{2}{1 + e^{-2 \cdot x}} - 1double f(double x, double __attribute__((unused)) y) {
double r8877 = 2.0;
double r8878 = 1.0;
double r8879 = -2.0;
double r8880 = x;
double r8881 = r8879 * r8880;
double r8882 = exp(r8881);
double r8883 = r8878 + r8882;
double r8884 = r8877 / r8883;
double r8885 = r8884 - r8878;
return r8885;
}
Please include this information when filing a bug report:
herbie shell --seed 2019173
(FPCore (x y)
:name "Logistic function from Lakshay Garg"
(- (/ 2.0 (+ 1.0 (exp (* -2.0 x)))) 1.0))
| atab-pick-alt: contract violation expected: alt? given: '(#<alt (λ (x y) (- (/ 2.0 (+ 1.0 (exp (* -2.0 x)))) 1.0))>) in: the range of the #:picking-func argument of (-> alt-table? #:only-fresh boolean? #:picking-func (-> (listof alt?) alt?) (values alt? alt-table?)) contract from: /data/pavpan/nightlies/herbie/no-costs-2/src/core/alt-table.rkt blaming: /data/pavpan/nightlies/herbie/no-costs-2/src/mainloop.rkt (assuming the contract is correct) at: /data/pavpan/nightlies/herbie/no-costs-2/src/core/alt-table.rkt:13.3 | L | C | |
|---|---|---|---|
| raise-blame-error16 | /opt/racket-7.0/collects/racket/contract/private/blame.rkt | 347 | 0 |
| (unnamed) | /data/pavpan/nightlies/herbie/no-costs-2/src/core/alt-table.rkt | 59 | 0 |
| (unnamed) | /opt/racket-7.0/collects/racket/contract/private/arrow-val-first.rkt | 388 | 18 |
| choose-best-alt! | /data/pavpan/nightlies/herbie/no-costs-2/src/mainloop.rkt | 110 | 0 |
| run-iter! | /data/pavpan/nightlies/herbie/no-costs-2/src/mainloop.rkt | 319 | 0 |
| for-loop | /data/pavpan/nightlies/herbie/no-costs-2/src/mainloop.rkt | 353 | 4 |
| run-improve43 | /data/pavpan/nightlies/herbie/no-costs-2/src/mainloop.rkt | 338 | 0 |
| (unnamed) | /opt/racket-7.0/collects/racket/private/more-scheme.rkt | 261 | 28 |
| run | /opt/racket-7.0/share/pkgs/profile-lib/main.rkt | 39 | 2 |
| profile-thunk16 | /opt/racket-7.0/share/pkgs/profile-lib/main.rkt | 9 | 0 |
| (unnamed) | /opt/racket-7.0/collects/racket/private/more-scheme.rkt | 261 | 28 |