\frac{x - y}{\left(x \cdot 2\right) \cdot y}double f(double x, double y) {
double r18823 = x;
double r18824 = y;
double r18825 = r18823 - r18824;
double r18826 = 2.0;
double r18827 = r18823 * r18826;
double r18828 = r18827 * r18824;
double r18829 = r18825 / r18828;
return r18829;
}
Please include this information when filing a bug report:
herbie shell --seed 2019173 +o rules:numerics
(FPCore (x y)
:name "Linear.Projection:inversePerspective from linear-1.19.1.3, B"
:herbie-target
(- (/ 0.5 y) (/ 0.5 x))
(/ (- x y) (* (* x 2.0) y)))
| atab-pick-alt: contract violation expected: alt? given: '(#<alt (λ (x y) (/ (/ (- x y) x) (* 2.0 y)))>) 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 |