MathGroup Archive 2003

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

Search the Archive

number formatting again

  • To: mathgroup at smc.vnet.net
  • Subject: [mg45031] number formatting again
  • From: "mandarino" <pams at wwwsrv1.cepus.net>
  • Date: Sat, 13 Dec 2003 06:06:31 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

I have done some geodetic-GPS calculations recently, and mostly I want to
format my calculations with 3 decimal places (mm accuracy), because the
integer part of a calculation can be a number with ~1-7 digits it is nowdays
difficult to find a formatting procedure that print out all digits to the
third decimal  (without exponential format).
I work with NumberFormat, Scientificformat and EngineeringFormat but they
does not seem to work in all cases, (in some cases I get exponential
formatting).

example:
I want to use a simple way to make Mathematica print out the results:

Like this: 12.456  m and 129384759.133 m

and not like this: 1.29384759133 10^8 in the last case.

Is there some better way to handle this formatting problem that somebody can
suggest?
I used to use N[x,n] (in version 3.1) wich nowdays behaves differently.
e.g.
N[Pi,30]= 3.14159265358979328464338328
and
N[Pi,10]=3.14159
As you can see one have no control over the number of printed decimals.
I know it is possible to construct some formatting Module or function, but
this is not what I want.
Best
Peter W



  • Prev by Date: Re: Now I understand that it was an input problem!!
  • Next by Date: Re: Now I understand that it was an input problem!!
  • Previous by thread: RE: Programming in Mathematica
  • Next by thread: RE: number formatting again