Revert "improve numerical stability"

This reverts commit 914d5e3930d760d952cc7c719bcdcb91aa209a05.