[Carpet] CarpetIOBasic defaults to fixed precision for values as small as 1e-8
Erik Schnetter
schnetter at cct.lsu.edu
Thu Aug 10 17:06:30 CEST 2006
On Aug 10, 2006, at 10:20:50, Jonathan Thornburg wrote:
> Hi,
>
> In formatting INFO output, CarpetIOBasic defaults to printing values
> in fixed format (C "%f") if they're between real_min and real_max,
> and in scientific format (C "%g") otherwise. The default settings
> (in the current-darcs version) are
> real_min = 1.0e-8
> real_max = 1.0e+3
>
> It seems to me that it would be useful to raise real_min to 1.0e-4
> or so. Since the default fixed format has 7 digits after the decimal
> point, this would ensure that at least 3 significant figures would
> always be printed. In contrast, the current-darcs default prints
> some nonzero values (eg 2.0e-8) as "0.0000000", which I find quite
> confusing.
>
> comments?
%g is not the scientific format. %g chooses between scientific and
fixed form automatically, depending on the number of digits to be
shown and the value to be printed. Basically, %g prefers fixed
format, but it makes sure that no digits are "wasted" with
superfluous zeros. Scientific format is %e. Personally I prefer to
use %g always, since it makes the right choice -- except if you don't
want the scientific format at all, in which case one would use %f.
-erik
--
Erik Schnetter <schnetter at cct.lsu.edu>
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from www.keyserver.net.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : /archives/developers/attachments/20060810/95fb96f4/attachment.pgp
More information about the developers
mailing list