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

Home » Public Forums » archive » format codes
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: format codes [message #93680 is a reply to message #93679] Wed, 28 September 2016 08:22 Go to previous messageGo to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
Interesting. I seem not to be able to travel forward in time... When is 8.6 appearing for non-time travelers?
Any further sneak preview info (apart from the c_style output formatting)?

Thanks,
h



On Wednesday, September 28, 2016 at 5:00:20 PM UTC+2, Jim P wrote:
> On Wednesday, September 28, 2016 at 5:44:57 AM UTC-6, Craig Markwardt wrote:
>> On Tuesday, September 27, 2016 at 10:49:42 AM UTC-4, sayani ghosh wrote:
>>> I am working with with phase data that looks like 23568978.124578 in cycles.
>>> I want to export the whole value in decimal format without rounding off. The problem while using E11.4 or a or G10.4 is, IDL is rounding my data like 2.3568e+007.. Which is leading to errors in consequent calculations.
>>
>> FORMAT='(G)'
>>
>> will print the full double precision and include the exponent where necessary.
>
> For those reading this thread in the future with IDL 8.6 or later, be aware of the difference between "(G)" (FORTRAN-style) and "%g" (C_style) FORMAT specifiers because they are not equivalent.
>
> IDL> print, a, format = '(G)'
> 1.234567891011112E-066
> IDL> print, a, format = '%g'
> 1.23457e-066
> IDL> print, a, format = '%22g'
> 1.234567891011112e-066
>
> Jim P.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to read nc variable partly?
Next Topic: high rise building extraction from satellite image

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

Current Time: Wed Oct 08 16:03:45 PDT 2025

Total time taken to generate the page: 0.00500 seconds