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

Home » Public Forums » archive » HELP with IF statement
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: HELP with IF statement [message #91280 is a reply to message #91278] Thu, 25 June 2015 08:42 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
g.nacarts@gmail.com writes:

> Something that I don't understand. I tried to avoid the for loop created before and I replace this part of the code:
>
> for i=0,n-1 do begin
> IF floats_equal(A[i],0) THEN RETURN,[0,0]
> endfor
>
> By this:
>
> IF norm(A) EQ 0 THEN RETURN, [0,0]
>
> I thought I will end up with the same result but I didn't. Does anyone know why this happen?

Most of the people who follow this newsgroup knows why it happens:

http://www.idlcoyote.com/math_tips/sky_is_falling.html
http://www.idlcoyote.com/math_tips/storenum.html
http://www.idlcoyote.com/math_tips/razoredge.html
http://www.idlcoyote.com/code_tips/lhsvsrhs.html
http://www.idlcoyote.com/math_tips/double.html

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: BYTSCL function
Next Topic: IDL Site Issues

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

Current Time: Wed Oct 08 18:21:29 PDT 2025

Total time taken to generate the page: 0.00548 seconds