[LON-CAPA-users] nS in &format
Joseph Topich
lon-capa-users@mail.lon-capa.org
Thu, 07 Jul 2005 17:08:46 -0400
#Enter the computations here
$a=&format(&random(1.00,9.99,0.10),'2f');
$b=58.44;
$c=$a*$b;
$c=&format($c, '3s');
Guy,
The script above will display 3 significant figures but it does not round
up. If I use 2e instead of 3s, it displays x.xxEx with the exponential
number rounded properly.
Joe Topich
At 03:15 PM 7/7/2005 -0400, you wrote:
>Hi Joe,
>
> > When using the LON-CAPA "&format" function with the nS parameter, I get
> > the correct number of significant figures but it doesn't round
> > properly.
>
>This is a new feature we are testing for 2.0 so there might be some
>issues with it, can you give me an example of it 'not rounding
>properly' so I can fix it?
>
>Thanks!
>
>--
>guy@albertelli.com 0-7-2-5-15,728
>_______________________________________________
>LON-CAPA-users mailing list
>LON-CAPA-users@mail.lon-capa.org
>http://mail.lon-capa.org/mailman/listinfo/lon-capa-users