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 #47960 is a reply to message #47958] Fri, 10 March 2006 06:28 Go to previous messageGo to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <1141997588.908348.289430@j52g2000cwj.googlegroups.com>,
"Steve.Morris@libero.it" <Steve.Morris@libero.it> wrote:

> Hi all,
>
> I need a quick advice on the way to write number in the exponent format
> I want.
> For example, I want the number printed on my screen in the following
> form
> -2.3435e-5
>
> i.e. 4 digits after the point and as function of e-5
>
> Any suggestion? I have tryed to use the format='(EX.X)' but without
> much of a success .... :(

I think one reason that the E format works the way it does:

IDL> print, -2.3435E-5, format = "(E12.4)"
-2.3435E-05

is to ensure that the exponent part of the field is always 4 digits.
That makes it easy to produce uniformly-aligned tables of numbers.

If you really want the result to appear like this

-2.3435e-5

you could always format it yourself (base-10 logarithms come to mind).

Ken Bowman
[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: Sat Oct 11 16:17:14 PDT 2025

Total time taken to generate the page: 1.29829 seconds