
(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
\begin{array}{l}
\\
\frac{1}{1 + e^{\frac{-x}{s}}}
\end{array}
herbie shell --seed 2024230
(FPCore (x s)
:name "Logistic function"
:precision binary32
:pre (and (<= 0.0 s) (<= s 1.0651631))
(/ 1.0 (+ 1.0 (exp (/ (- x) s)))))
Please file a bug report with this information.
| match: no matching clause for 'y | L | C | |
|---|---|---|---|
| make-compiler | /home/nightlies/herbie/bhargav-log-space/src/core/compiler.rkt | 56 | 0 |
| predict-errors | /home/nightlies/herbie/bhargav-log-space/src/core/explain.rkt | 79 | 0 |
| explain | /home/nightlies/herbie/bhargav-log-space/src/core/explain.rkt | 603 | 0 |
| explain! | /home/nightlies/herbie/bhargav-log-space/src/core/mainloop.rkt | 321 | 0 |
| run-improve! | /home/nightlies/herbie/bhargav-log-space/src/core/mainloop.rkt | 43 | 0 |
| get-alternatives/report | /home/nightlies/herbie/bhargav-log-space/src/api/sandbox.rkt | 184 | 0 |
| (unnamed) | /home/nightlies/herbie/bhargav-log-space/src/api/sandbox.rkt | 280 | 6 |
| (unnamed) | /usr/local/racket/share/pkgs/profile-lib/main.rkt | 40 | 10 |
| profile-thunk | /usr/local/racket/share/pkgs/profile-lib/main.rkt | 9 | 0 |
| (unnamed) | /usr/local/racket/collects/racket/engine.rkt | 42 | 24 |