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

Home » Public Forums » archive » Re: formatting exponential notation
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: formatting exponential notation [message #47956] Fri, 10 March 2006 08:42 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> So, anyway, long story short, I wrote a program called
> NUMBER_FORMATTER to to this for me. For my purposes, it
> works great. After I saw this post, I thought I would make
> it available on my web page.
>
> http://www.dfanning.com/programs/number_formatter.pro

After posting this, I noticed that my algorithm wasn't
rounding properly:

IDL> number = -2.343583743e-5
IDL> Print, Number_Formatter(number, DECIMALS=4)
-2.3435e-5

So I've just put up a new version that does this
correctly.

IDL> Print, Number_Formatter(number, DECIMALS=4)
-2.3436e-5

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How do I reduce active memory used by program?
Next Topic: Intel iMac IDL performance

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

Current Time: Fri Oct 10 00:53:51 PDT 2025

Total time taken to generate the page: 1.28077 seconds