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

Home » Public Forums » archive » Re: NaN in pv-wave
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: NaN in pv-wave [message #14379] Thu, 25 February 1999 00:00
Dr. Dirk Engelbart is currently offline  Dr. Dirk Engelbart
Messages: 2
Registered: February 1999
Junior Member
jlh wrote:
>
> Hi,
>
> In IDL the expression for NaN (Not a Number ) is :
> !values.f_nan. Does anyone know if there is an equivalent expression
> in pvwave ?
>
> Thanks,
>
> Jacob


Jacob,

Trying to do various translation tasks between WAVE and IDL, I
recently had the same question as you. The answer is simple as you will
see below. You simply need to have the IMSL mathematics package being
standard in PV-WAVE Advantage. This package includes the function
MACHINE() which can be used as follows:

values = MACHINE(/Float)
; Get the single-precision, floating-point machine constants. This call
supplies a ;structure whose elements might be inspected ba calling
values using the /STRUCTURE keyword. One of the elements of values will
then be "values.nan"!

info,values,/STRUCTURE


; As an example for the data assignment of variables look at the
following line which assigns a 3-element vector "a" using the intended
"NaN" as well as additionally negative-infinite values.

a = [values.nan,3.0,values.neg_inf]

This means in PV-WAVE you can use exactly the same function as in IDL
"!values.f_nan" by calling the function "values.nan".

That's it.
Regards,

DIRK.

--


_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

Dirk Engelbart
DWD - Observat.Lindenberg
engelbart@mol.dwd.d400.de

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
[Message index]
 
Read Message
Previous Topic: Re: General purpose structure editor?
Next Topic: Re: Can I make entries in CW_PDMENU insensitive?

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

Current Time: Fri Oct 10 00:59:14 PDT 2025

Total time taken to generate the page: 0.00419 seconds