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

Home » Public Forums » archive » Re: Specify the degree of accuracy of a floating point 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: Specify the degree of accuracy of a floating point number [message #52606 is a reply to message #52603] Wed, 21 February 2007 22:22 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
loknath writes:

> Is there a way to convert a single precision or double precision
> floating point number to an accuracy of specified decimal places? In
> other words, if I want to write 0.268954 or 233.256 to an accuracy of
> 2 decimal places, i.e. 0.27 and 233.26, is there a way to do it?

You could try NUMBER_FORMATTER:

http://www.dfanning.com/programs/number_formatter.pro

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Displaying slices using same scaling
Next Topic: READ issue

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

Current Time: Wed Dec 03 07:45:22 PST 2025

Total time taken to generate the page: 0.02559 seconds