What is precision of a number representation? (was: Curious Omission In New-Style Formats)

Steven D'Aprano steve at pearwood.info
Tue Jul 12 00:19:37 EDT 2016


On Tue, 12 Jul 2016 07:51 am, Chris Angelico wrote:

> say, 2,147
> millimeters, with a precision of four significant digits


How do you represent 1 mm to a precision of four significant digits, in such
a way that it is distinguished from 1 mm to one significant digit, and 1 mm
to a precision of four decimal places?

0001
1
1.0000



-- 
Steven
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list