Sigmoid activation function simplified using Math.exp