Convert scientific notation to decimal?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 253
- Joined: Wed Aug 19, 2015 4:29 pm
Convert scientific notation to decimal?
I'm looking for a way to convert a number represented in scientific notation such as "9.0260588394524e-5 " to a more human readable decimal format. Is there a function for this in LC?
Re: Convert scientific notation to decimal?
It would be fun to write such a function, simple and straightforward, but do check out the "format" function in the dictionary. That gadget is an embarrassment of riches for just the sort of thing you asked for.
Craig Newman
Craig Newman
Re: Convert scientific notation to decimal?
Hi ClipArtGuy,ClipArtGuy wrote:I'm looking for a way to convert a number represented in scientific notation such as "9.0260588394524e-5 " to a more human readable decimal format. Is there a function for this in LC?
check format() in the dictionary.
Code: Select all
put "9.0260588394524e-5" into X
put format( "%s to floating point: %.6f ", X, X )
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!
-
- Posts: 253
- Joined: Wed Aug 19, 2015 4:29 pm
Re: Convert scientific notation to decimal?
Thanks Craig and Thierry! It looks like format() is exactly what I needed.