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

Home » Public Forums » archive » Re: IDL strplit : split a decimal number
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: IDL strplit : split a decimal number [message #40005] Wed, 07 July 2004 09:08 Go to previous message
mwvogel is currently offline  mwvogel
Messages: 9
Registered: February 2003
Junior Member
"Paolo Grigis" <pgrigis@astro.phys.ethz.ch> schreef in bericht
news:40ec199f$1@pfaff2.ethz.ch...
>
> It is slightly confusing, however, that IDL
>
> IDL> print,!dpi,format='(D50.40)'
> 3.1415926535897931159979634685441851615906
>
> makes up some nonsense digits after reaching the machine precision
> limit.
>
> I guess I would have preferred a "simpler" output like
> 3.14159265358979300000000000000000000... when one can easily
> spot that the double precision limit is reached at the 15th
> digit.
>

Now, this is what happens on my machine { x86 (AMD Athlon) Win32 Windows 5.4
Sep 25 2000 32 64} :
IDL> print,!dpi,format='(D50.40)'
3.1415926535897931000000000000000000000000

Alternatively, I think RSI has made the E format specifier to limit the
number to machine precision.
IDL> print,!dpi,format='(E)'
3.1415926535897931E+000
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Rebinning large array
Next Topic: Re: IDL strplit : split a decimal number -errata

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

Current Time: Wed Oct 08 18:58:59 PDT 2025

Total time taken to generate the page: 0.00389 seconds