\frac{1}{1 + e^{\frac{-x}{s}}}\frac{1}{1 + e^{\frac{-x}{s}}}(FPCore (x s) :precision binary32 (/ 1.0 (+ 1.0 (exp (/ (- x) s)))))
(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));
}
float code(float x, float s) {
return 1.0f / (1.0f + expf(-x / s));
}



Bits error versus x



Bits error versus s
Results
Initial program 0.1
rmApplied pow1_binary320.1
Final simplification0.1
herbie shell --seed 2021175
(FPCore (x s)
:name "Logistic CDF"
:precision binary32
:pre (<= 0.0 s 1.0651631)
(/ 1.0 (+ 1.0 (exp (/ (- x) s)))))