comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: division to move a decimal point
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: division to move a decimal point [message #74067 is a reply to message #74066] Fri, 31 December 2010 09:21 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jeff writes:

> I would like to convert the number 1948005 to 19480.05
> The closest I can get is
> print, 1948005*1./100.
> which gives 19480.1
> Any help would be appreciated!

You might be interested in the Number_Formatter function in
the Coyote Library, described at the end of this article:

http://www.dfanning.com/misc_tips/dbl_to_str.html

IDL> print, number_formatter(1948005/100., decimal=2)
19480.05

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Convolving a vector with the 2nd derivative of a Gaussian
Next Topic: Re: Book Draft Finished!

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 15:33:06 PDT 2025

Total time taken to generate the page: 1.83710 seconds