Re: Number of digits in a number [82]
[Prev][Next][Index][Thread]
On Wed, 18 Sep 1996 23:29:04 GMT, mtm@maurano.com (Matt Maurano)
wrote:
>I need to know how to find the number of digits in a number. For
>example:
>
>Number: Digits:
>.1234 4
>1.23 3
>9 1
>
>For those interested, this is for the second flag passed to the round(
>function. Its for a convert program I've been working on, and it would
>help if I could round the answer to the number of significant digits.
>
>Please E-Mail responses. Thanks in advance.
>
>P.S.: Right now, the program is ~<1k and does standard to and from
>metric, as well as time conversions. If anyone wants me to post it,
>just E-Mail me.
>---
>Matt Maurano
>mtm@maurano.com
I'm not sure about the TI-82 programming language, but in Basic you
could change the number to a string, then use the LEN command to find
the number of characters in the string. Subtract 1 if the number has
a decimal point.
References: