(FPCore (x s) :precision binary64 (/ 1.0 (+ 1.0 (exp (/ (- x) s)))))
double code(double x, double s) {
return 1.0 / (1.0 + exp((-x / s)));
}
real(8) function code(x, s)
real(8), intent (in) :: x
real(8), intent (in) :: s
code = 1.0d0 / (1.0d0 + exp((-x / s)))
end function
public static double code(double x, double s) {
return 1.0 / (1.0 + Math.exp((-x / s)));
}
def code(x, s): return 1.0 / (1.0 + math.exp((-x / s)))
function code(x, s) return Float64(1.0 / Float64(1.0 + exp(Float64(Float64(-x) / s)))) end
function tmp = code(x, s) tmp = 1.0 / (1.0 + exp((-x / s))); end
code[x_, s_] := N[(1.0 / N[(1.0 + N[Exp[N[((-x) / s), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{1}{1 + e^{\frac{-x}{s}}}
Please include this information when filing a bug report:
herbie shell --seed 2022349
(FPCore (x s)
:name "Logistic function"
:precision binary64
:pre (and (<= 0.0 s) (<= s 1.0651631))
(/ 1.0 (+ 1.0 (exp (/ (- x) s)))))
| error writing to stream port system error: Broken pipe; errno=32 | L | C | |
|---|---|---|---|
| writeln | /usr/share/racket/collects/racket/private/misc.rkt | 156 | 4 |
| run-egglog | /home/nightlies/nightlies/herbie/oflatt-egglog-ctx/src/egglog/run-egglog.rkt | 1301 | 0 |
| run-simplify-input | /home/nightlies/nightlies/herbie/oflatt-egglog-ctx/src/core/simplify.rkt | 74 | 0 |
| simplify-batch | /home/nightlies/nightlies/herbie/oflatt-egglog-ctx/src/core/simplify.rkt | 51 | 0 |
| (unnamed) | /usr/share/racket/collects/racket/contract/private/arrow-higher-order.rkt | 379 | 33 |
| get-swaps | /home/nightlies/nightlies/herbie/oflatt-egglog-ctx/src/symmetry.rkt | 6 | 0 |
| connected-components | /home/nightlies/nightlies/herbie/oflatt-egglog-ctx/src/symmetry.rkt | 20 | 0 |
| run-improve! | /home/nightlies/nightlies/herbie/oflatt-egglog-ctx/src/mainloop.rkt | 320 | 0 |
| (unnamed) | /home/nightlies/nightlies/herbie/oflatt-egglog-ctx/src/sandbox.rkt | 55 | 6 |
| (unnamed) | /usr/share/racket/pkgs/profile-lib/main.rkt | 40 | 10 |
| profile-thunk | /usr/share/racket/pkgs/profile-lib/main.rkt | 9 | 0 |
| (unnamed) | /usr/share/racket/collects/racket/engine.rkt | 42 | 24 |