Re: Calculate the precision of a floating point number (ie: the number of decimal places)
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Tue, 30 Oct 2007 16:53:37 -0500
Ed Prochak wrote:
Lori <steve.lori...@xxxxxxxxx> wrote:
I'm trying to write a reliable and efficient library function that
will calculate the precision of an input number (floating point).
IOW number of significant digits?
First, can you tell me how many significant digits exist in these
numbers
0.01e-21
0.00
0.000000
Yes. Just count the digits typed. The answers are 3, 3, 7.
--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
--
Posted via a free Usenet account from http://www.teranews.com
.
- References:
- Prev by Date: Re: Does the order matter to add a sequence of floating numbers
- Next by Date: Red Black Guaruntees
- Previous by thread: Re: Calculate the precision of a floating point number (ie: the number of decimal places)
- Next by thread: Re: Calculate the precision of a floating point number (ie: the number of decimal places)
- Index(es):
Relevant Pages
|