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

Home » Public Forums » archive » Re: what is Floating illegal operand question?
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: what is Floating illegal operand question? [message #43695 is a reply to message #43693] Mon, 18 April 2005 13:39 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
lixiaoyao writes:

> when I run this code in idl,it generated the following wrong
> information,what is
> wrong there?
> % Compiled module: $MAIN$.
> % Program caused arithmetic error: Floating illegal operand
> window,xs=640,ys=480
> x=10*!pi*findgen(1001)/1000
> sn=sin(x)/x
> plot,x,sn
> end

IDL> Print, Sin(0)/0
-NaN
% Program caused arithmetic error: Floating illegal operand

Not sure you want to be dividing by zero. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Creating arrays of structures with Callable C
Next Topic: how to draw three-dimension graph using IDL

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

Current Time: Fri Oct 10 04:02:26 PDT 2025

Total time taken to generate the page: 1.36080 seconds