Page 1 of 1

significant digits

Posted: Sun Jun 19, 2011 7:47 pm
by dhobbs
I'm not sure how to insure a certain number of significant digits in a number I'm diplaying.

As an example, I perform a calculation and get a number: 35.003742.
If I use statRound(35.003742,2) I get 35 (written without any decimal point). Not 35.00. How to I get "35.00"? Is there another function that specifies how many decimal places you want to diplay in a number? Most of the calculations do not

I'm sure I could catch this with a separate function and add the zero's, but that seems roundabout.

Thanks,

--Doug

Re: significant digits

Posted: Sun Jun 19, 2011 7:56 pm
by bn
Hi Doug,

look at "numberformat" in the dictionary.

Just be aware that you have to set the numberformat before you make any calculation. If you just have a number and want it displayed in the form of the numberformat you specified just add a zero to that number and the numberformat will be in effect.

Kind regards

Bernd