Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
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
x
a
number
y
a
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