linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Leslie Polzer <leslie.polzer@gmx.net>
To: Shriramana Sharma <samjnaa@gmail.com>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: Double values - what precision do I use for fprintf?
Date: Thu, 12 Jan 2006 15:17:08 +0100	[thread overview]
Message-ID: <20060112151708.24751b03.leslie.polzer@gmx.net> (raw)
In-Reply-To: <200601121800.19678.samjnaa@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]


On Thu, 12 Jan 2006 18:00:19 +0530
Shriramana Sharma <Shriramana Sharma <samjnaa@gmail.com>> wrote:

 | First I tried using "%20.15f" as the format string:
 |
 | [...]
 | 
 | Then I used "%30.25f":
 |
 | [...] 
 | 
 | Ignoring the small differences in the two sets of data (longitude and speed
 | of eight celestial bodies computer at two different instants) I wonder - if
I | keep increasing the number of decimal places where will it end?
At some point you will get only zeroes.  This point is reached when the mantissa
length is exceeded.

Leslie


-- 
gpg --keyserver pgp.mit.edu --recv-keys 0x52D70289

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-01-12 14:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-12 12:30 Double values - what precision do I use for fprintf? Shriramana Sharma
2006-01-12 14:17 ` Patrick Leslie Polzer [this message]
2006-01-12 18:51 ` Steve Graegert
2006-01-12 21:22   ` Nate Jenkins
2006-01-12 22:00     ` Mihai Dontu
2006-01-13 23:47     ` Glynn Clements
2006-01-14  0:35       ` Nate Jenkins
2006-01-17  5:37         ` Glynn Clements
2006-01-12 21:57   ` Scott
2006-01-12 22:06     ` Scott
2006-01-13  5:25     ` Steve Graegert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060112151708.24751b03.leslie.polzer@gmx.net \
    --to=leslie.polzer@gmx.net \
    --cc=linux-c-programming@vger.kernel.org \
    --cc=samjnaa@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).