News for hackers. Stuff that matters.
Re:Python rounds float values by converting them to string a... by emsy on Wednesday August 28, 2019 @06:44AM (#20818490)
Python already doesn't have the best performance. If you need to round a lot of floats in a loop you better bring some time.
Re:Python rounds float values by converting them to string a... by pletnes on Wednesday August 28, 2019 @06:50AM (#20818521)
Or use numpy, like the rest of us.
Re:Python rounds float values by converting them to string a... by sqrt17 on Wednesday August 28, 2019 @08:21AM (#20819033)
round() is specifically about rounding to decimal places, and there are other, faster functions for the more common cases