improve the performance of sigmoid function