Significant figures calculation

Steven D'Aprano steve+comp.lang.python at pearwood.info
Tue Jun 28 04:35:36 EDT 2011


On Tue, 28 Jun 2011 01:16 pm Chris Angelico wrote:

> On Tue, Jun 28, 2011 at 12:56 PM, Steven D'Aprano
> <steve+comp.lang.python at pearwood.info> wrote:
>> Zero sig figure: 0
>>
> 
> Is 0.0 one sig fig or two? (Just vaguely curious. Also curious as to
> whether a zero sig figures value is ever useful.)

Two. I was actually being slightly silly about zero fig figures.

Although, I suppose, if you genuinely had zero significant figures, you
couldn't tell what the number was at all, so you'd need to use a NaN :)


-- 
Steven




More information about the Python-list mailing list