(FPCore (x s) :precision binary32 (/ 1.0 (+ 1.0 (exp (/ (- x) s)))))
float code(float x, float s) {
return 1.0f / (1.0f + expf((-x / s)));
}
real(4) function code(x, s)
real(4), intent (in) :: x
real(4), intent (in) :: s
code = 1.0e0 / (1.0e0 + exp((-x / s)))
end function
function code(x, s) return Float32(Float32(1.0) / Float32(Float32(1.0) + exp(Float32(Float32(-x) / s)))) end
function tmp = code(x, s) tmp = single(1.0) / (single(1.0) + exp((-x / s))); end
\frac{1}{1 + e^{\frac{-x}{s}}}
Please include this information when filing a bug report:
herbie shell --seed 2022150
(FPCore (x s)
:name "Logistic function"
:precision binary32
:pre (and (<= 0.0 s) (<= s 1.0651631))
(/ 1.0 (+ 1.0 (exp (/ (- x) s)))))
| application: required keyword argument not supplied procedure: batch-egg-rewrite required keyword: #:rules arguments...: '(#<rule erfc-erf_binary32> #<rule erf-erfc_binary32> #<rule erf-odd_binary32> #<rule prod-diff_binary32> #<rule hypot-udef_binary32> #<rule expm1-log1p-u_binary32> #<rule log1p-expm1-u_binary32> #<rule log1p-udef_binary32> #<rule expm1-udef_binary32> #... #:depths '(1 1 1) #:roots '((2) (2) (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 |