The division operator has a higher precendence than the addition operator, so your function is calculating (1/1) + e^-x. All you need to do is add brackets to force the evaluation to be 1/(1+e^-x).
There is a built in e^x function.
There is probably no need to use a Single rather than a Double.
You need to declare the return type of the function - a Double is probably better for what you are using it for than a Decimal. The use of Option Strict On
would have told you about the former; I strongly recommend that you use it and set it to be the default for new VB projects.
Function sigmoid(x As Double) As Double
Return 1 / (1 + Math.Exp(-x))
End Function
Please see Operator Precedence in Visual Basic and Option Strict On.