Re: How to detect a double's significant digits
- From: Erik Max Francis <max@xxxxxxxxxxx>
- Date: Thu, 05 May 2005 13:43:37 -0700
Jeremy Bowers wrote:
Step one for mrstephengross is to *rigorously* define what he means by "significant digits", then go from there. Since I think he mentioned something about predicting how much space it will take to print out, my suggestion is to run through whatever printing routines there are and get a string out, the measure the string, as anything else will likely be wrong. If that's not possible with the formatting library, you've already lost; you'll have to completely correctly re-implement the formatting library, and not only is that a major PITA, you almost never get it bug-for-bug right...
Especially since all of his examples have the same number of significant digits (3), as the term is usually meant. Zeroes to the right are significant, not zeroes to the left.
-- Erik Max Francis && max@xxxxxxxxxxx && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis What is it that shapes a species? -- Louis Wu .
- Follow-Ups:
- Re: How to detect a double's significant digits
- From: Grant Edwards
- Re: How to detect a double's significant digits
- References:
- How to detect a double's significant digits
- From: mrstephengross
- Re: How to detect a double's significant digits
- From: Charles Krug
- Re: How to detect a double's significant digits
- From: Jeremy Bowers
- How to detect a double's significant digits
- Prev by Date: Re: Encryption with Python?
- Next by Date: Re: Encryption with Python?
- Previous by thread: Re: How to detect a double's significant digits
- Next by thread: Re: How to detect a double's significant digits
- Index(es):
Relevant Pages
|