sigmoid ( x -- y )
Factor documentation > Factor handbook > The language > Numbers > Mathematical functions > Powers and logarithms
Prev:10^ ( x -- y )
Next:nth-root ( n x -- y )


Vocabulary
math.functions

Inputs and outputs
xa number
ya number


Word description
Outputs the sigmoid, an S-shaped "logistic" function, from 0 to 1, of the number x.

Definition
USING: math ;

IN: math.functions

: sigmoid ( x -- y ) neg e^ 1 + recip ; inline