(FPCore (f n) :precision binary64 (/ (- (+ f n)) (- f n)))
double code(double f, double n) {
return -(f + n) / (f - n);
}
real(8) function code(f, n)
real(8), intent (in) :: f
real(8), intent (in) :: n
code = -(f + n) / (f - n)
end function
public static double code(double f, double n) {
return -(f + n) / (f - n);
}
def code(f, n): return -(f + n) / (f - n)
function code(f, n) return Float64(Float64(-Float64(f + n)) / Float64(f - n)) end
function tmp = code(f, n) tmp = -(f + n) / (f - n); end
code[f_, n_] := N[((-N[(f + n), $MachinePrecision]) / N[(f - n), $MachinePrecision]), $MachinePrecision]
\frac{-\left(f + n\right)}{f - n}
Please include this information when filing a bug report:
herbie shell --seed 2022150
(FPCore (f n)
:name "subtraction fraction"
:precision binary64
(/ (- (+ f n)) (- f n)))
| application: required keyword argument not supplied procedure: batch-egg-rewrite required keyword: #:rules arguments...: '(#<rule erfc-erf_binary64> #<rule erf-erfc_binary64> #<rule erf-odd_binary64> #<rule prod-diff_binary64> #<rule hypot-udef_binary64> #<rule expm1-log1p-u_binary64> #<rule log1p-expm1-u_binary64> #<rule log1p-udef_binary64> #<rule expm1-udef_binary64> #... #:depths '(1) #:roots '((2)) | L | C | |
|---|---|---|---|
| (unnamed) | /opt/racket-8.1/collects/racket/private/kw.rkt | 1558 | 14 |
| rewrite-expressions | /data/pavpan/nightlies/herbie/timeline/src/core/matcher.rkt | 171 | 0 |
| gen-rewrites! | /data/pavpan/nightlies/herbie/timeline/src/patch.rkt | 144 | 0 |
| patch-table-run | /data/pavpan/nightlies/herbie/timeline/src/patch.rkt | 291 | 0 |
| (unnamed) | /opt/racket-8.1/collects/racket/contract/private/arrow-val-first.rkt | 486 | 18 |
| run-iter! | /data/pavpan/nightlies/herbie/timeline/src/mainloop.rkt | 246 | 0 |
| mutate! | /data/pavpan/nightlies/herbie/timeline/src/mainloop.rkt | 379 | 0 |
| run-improve! | /data/pavpan/nightlies/herbie/timeline/src/mainloop.rkt | 326 | 0 |
| (unnamed) | /data/pavpan/nightlies/herbie/timeline/src/sandbox.rkt | 66 | 6 |
| (unnamed) | /opt/racket-8.1/share/pkgs/profile-lib/main.rkt | 40 | 10 |
| profile-thunk | /opt/racket-8.1/share/pkgs/profile-lib/main.rkt | 9 | 0 |
| (unnamed) | /opt/racket-8.1/collects/racket/engine.rkt | 42 | 24 |