Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: PrintPrecision

  • To: mathgroup at
  • Subject: [mg23182] Re: PrintPrecision
  • From: paulh at (P.J. Hinton)
  • Date: Fri, 21 Apr 2000 00:47:09 -0400 (EDT)
  • Organization: "Wolfram Research, Inc."
  • References: <8djlqq$> <8do0ak$>
  • Sender: owner-wri-mathgroup at

In article <8do0ak$hva at>,
 Ronald Bruck <bruck at> writes:

> I'm sick to death of the bizarre formatting rules which Mathematica 
> uses.  I want a plain, simple, fixed-format, in which a "1" will print 
> as a "1.0000" (NOT "1.") and a "1.39281" will print as a "1.3928" and a 
> "1.31" will print as a "1.3100".  I've tried NumberForm, I've tried 
> PaddedForm, I've tried writing the damned things to a file--and I cannot 
> get the simple, classical, traditional "f6.4".  HOW DO I DO THIS?!
> And when I print it to a file, I **don't** want to find the file filled 
> with a bunch of "NumberForm[..."'s.
> And as I mentioned in another post, **my** Options Inspector won't make 
> any changes.

Surely you must have overlooked using PaddedForm[] like this?

In[1]:= ToString[PaddedForm[#, {6, 4}]]& /@ {1., 1.39281, 1.31}

Out[1]= {  1.0000,   1.3928,   1.3100}

In[2]:= Export["testme.dat", %, "List"]

Out[2]= testme.dat

In[3]:= !! "testme.dat"

ToString[] is used to capture the textual representation emitted
by PaddedForm[].
P.J. Hinton
Mathematica Programming Group           paulh at
Wolfram Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.

  • Prev by Date: Re: Remote kernel with ssh
  • Next by Date: Help, my MathLink Examples segfault.
  • Previous by thread: Re: Re: PrintPrecision
  • Next by thread: Re: PrintPrecision