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

Home » Public Forums » archive » Re: Displaying floating point values with user specified decimal places?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Displaying floating point values with user specified decimal places? [message #43282] Fri, 25 March 2005 16:12
Jonathan Greenberg is currently offline  Jonathan Greenberg
Messages: 91
Registered: November 2002
Member
My brain just exploded.

With that said, that did help me find the issue!

--j


On 3/25/05 3:55 PM, in article MPG.1cae52c520d07b41989999@news.frii.com,
"David Fanning" <davidf@dfanning.com> wrote:

> Jonathan Greenberg writes:
>
>> How do I control how a system works with decimal places for floating point
>> values? For instance, I did a few fltarr assigns which end up displaying
>> (via print,array) a longish floating point value without the decimals which
>> I know are there (e.g. 657456. vs the "true" value of 657456.25), or in
>> scientific number format -- when I go to use, for instance, Dave Fannings
>> write_csv_data.pro, it writes the array out in the same format that
>> print,array spits out. How do I control this decimal display format?
>
> I think you might be ready for this article:
>
> http://www.dfanning.com/math_tips/sky_is_falling.html
>
> Have a look at the FORMAT keyword for both PRINT and PRINTF,
> then think about how many significant digits you can display
> in a float with computers. You may have to re-think your
> notion of a "true value". :-)
>
> Cheers,
>
> David
Re: Displaying floating point values with user specified decimal places? [message #43285 is a reply to message #43282] Fri, 25 March 2005 15:55 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jonathan Greenberg writes:

> How do I control how a system works with decimal places for floating point
> values? For instance, I did a few fltarr assigns which end up displaying
> (via print,array) a longish floating point value without the decimals which
> I know are there (e.g. 657456. vs the "true" value of 657456.25), or in
> scientific number format -- when I go to use, for instance, Dave Fannings
> write_csv_data.pro, it writes the array out in the same format that
> print,array spits out. How do I control this decimal display format?

I think you might be ready for this article:

http://www.dfanning.com/math_tips/sky_is_falling.html

Have a look at the FORMAT keyword for both PRINT and PRINTF,
then think about how many significant digits you can display
in a float with computers. You may have to re-think your
notion of a "true value". :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: 6.1 vs. previous: runtime changes working directory
Next Topic: do I need this IF statement?

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

Current Time: Sat Oct 11 08:29:41 PDT 2025

Total time taken to generate the page: 1.35776 seconds