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 
Return to the default flat view Create a new topic Submit Reply
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/
[Message index]
 
Read Message
Read Message
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: Fri Oct 17 21:30:27 PDT 2025

Total time taken to generate the page: 0.00269 seconds