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

Home » Public Forums » archive » Re: round to x number of decimals within floating point value?
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: round to x number of decimals within floating point value? [message #74335 is a reply to message #74333] Thu, 13 January 2011 15:55 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Jan 13, 5:35 pm, David Fanning <n...@dfanning.com> wrote:
> Snow53 writes:
>> I need to round the values within a file to three decimal places. For
>> example, 0.00053335 would become 0.001.
>> I also have many NaNs within the file.
>
>     goodval = where(array EQ Finite(), count)
>     if count gt 0 then begin
>        array[gooval] = Float(Round(array[goodval]*1000)/1000.)
>     endif

Is this a non-default finite()? The one I know takes an argument,
returning whether the elements are finite numbers (not infinity or
NaN).
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Temp variables are checked out
Next Topic: Re: Temp variables are checked out

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

Current Time: Thu Oct 09 18:57:35 PDT 2025

Total time taken to generate the page: 2.00041 seconds