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

Home » Public Forums » archive » Re: Question again :)
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: Question again :) [message #29025] Wed, 30 January 2002 05:14
the_cacc is currently offline  the_cacc
Messages: 104
Registered: October 2001
Senior Member
Note though that ABS for complex numbers can be fairly slow when
operating on large amounts of data (eg. big arrays, inner loops).
Sometimes the use of ABS in not essential if, for example, you have a
situation requiring the following:

ABS(z) GT threshold

then it is quicker to use

FLOAT(CONJ(z) * z) GT threshold^2

instead.

Ciao.
Re: Question again :) [message #29036 is a reply to message #29025] Tue, 29 January 2002 11:57 Go to previous message
Stein Vidar Hagfors H[1] is currently offline  Stein Vidar Hagfors H[1]
Messages: 56
Registered: February 2000
Member
dinhnq@yahoo.com (Dinh Huong) writes:

> Dear all,
>
> Is there any function that can calculate a complex�s mod? Suppose c =a
> + bi, which directly return sqrt(a^2+b^2).

IDL> print,abs(complex(-1,1))
1.41421

--
------------------------------------------------------------ --------------
Stein Vidar Hagfors Haugan
ESA SOHO SOC/European Space Agency Science Operations Coordinator for SOHO

NASA Goddard Space Flight Center, Email: shaugan@esa.nascom.nasa.gov
Mail Code 682.3, Bld. 26, Room G-1, Tel.: 1-301-286-9028/240-354-6066
Greenbelt, Maryland 20771, USA. Fax: 1-301-286-0264
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Naive pointer question ?
Next Topic: Re: In case someone has trouble including export.h

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

Current Time: Wed Oct 08 14:52:57 PDT 2025

Total time taken to generate the page: 0.00379 seconds