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 #43676] Tue, 19 April 2005 04:51 Go to previous message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Mike and James,
Thanks for the clarification. I was thrown off by the emphasized on floating
numbers on the mathworld web site. Deep inside it did not make any sense, so
I blamed it on the lecture I mussed have missed in college. :-)
Mike's explanation makes perfect sense, so thanks for straightening me
out...

Cheers,
Haje



"Michael Wallace" <mwallace.no.spam@no.spam.swri.edu.invalid> wrote in
message news:1168aupboi2v87b@corp.supernews.com...
> (0 / 0) is just as undefined as (0.0 / 0.0) is. However, there is no way
> to express NaN or Infinity when working with integers. The IEEE floating
> point specification allows for NaN and Infinity, but the integer spec does
> not. Without a NaN option, IDL (and other languages as well), default to
> evaluating (0 / 0) as 0 even though this is technically incorrect.
>
> -Mike
>
>
> Haje Korth wrote:
>> Well, if I understand this right, 0/0 is defined and the result is 0, so
>> that the division by zero message is only informational. On the other
>> hand 0./0. is not defined for floating point numbers and results in an
>> error (see http://mathworld.wolfram.com/DivisionbyZero.html). Correct me
>> if I am wrong.
>>
>> Haje
>>
>>
>>> You're getting it from a floating point divide by zero. When using
>>> integers, IDL actually tells you that you tried to divide by zero. For
>>> some reason, they have a different message for floating point.
>>>
>>> IDL> x = 0 / 0
>>> % Program caused arithmetic error: Integer divide by 0
>>> IDL> x = 0.0 / 0.0
>>> % Program caused arithmetic error: Floating illegal operand
>>>
>>> -Mike
>>
>>
[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: Wed Oct 08 17:57:58 PDT 2025

Total time taken to generate the page: 0.00451 seconds