fix round-off error, and new method has been applied.