MathGroup Archive 2007

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

Search the Archive

Re: Updating NumberPadding?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84349] Re: Updating NumberPadding?
  • From: Albert Retey <awnl at arcor.net>
  • Date: Thu, 20 Dec 2007 00:02:09 -0500 (EST)
  • References: <200712180017.TAA06282@smc.vnet.net> <fk7si4$rl8$1@smc.vnet.net> <fkao5l$dp7$1@smc.vnet.net>

Kevin J. McCann wrote:
> Carl,
> 
> If you raise Pi to zero or a negative power of ten, your last form below 
> does not work correctly, i.e. N[Pi]10^-1 produces 0.31x10.
> 
> I agree with David that it would be REALLY nice if WRI made it easier 
> for us to produce nice columnar data. I know it is not easy, as the 
> examples below show. I know from my FORTRAN days that a lot of CPU 
> cycles were used on formatted input and output. Still, it would be nice.

Isn't this better addressed with using Grid and an explicit setting for 
Alignment? The following gives me something that looks good enough for me:

Style[
  Grid[{
    {NumberForm[1000*N@Pi, {5, 2}]},
    {NumberForm[N@Pi, {5, 2}]},
    {NumberForm[N[Pi] 10^-1, {5, 2}]}
   },
   Alignment -> {"."}
   ],
  FontFamily -> "Helvetica"
  ]

albert


  • Prev by Date: ClearAll[f]; f[x_] := x^2; f[y_] :=y^4; (*What is:*) f[2]
  • Next by Date: Re: Problem with Out keeping the camera view direction
  • Previous by thread: Re: Updating NumberPadding?
  • Next by thread: Re: Updating NumberPadding?