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

Home » Public Forums » archive » Re: sqrt(-1)??? answer depends on platform!!!
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: sqrt(-1)??? answer depends on platform!!! [message #5475] Mon, 11 December 1995 00:00
hahn is currently offline  hahn
Messages: 108
Registered: November 1993
Senior Member
brooker@ccfm.ireq.ca wrote:

> An observation I just made for IDL ver 3.5.1 and how it interprets SQRT(-1).
> This should produce an error.

[output on various systems deleted]
> peter b.

IDL 4.0.1 for Windows gives...

IDL> a = sqrt(-1)
% Program caused arithmetic error: Floating illegal operand
IDL> print, a
-1.#IND0
IDL> help, a
A FLOAT = -1.#IND0

Obviously IDL gets a NAN from the math processor...

IDL 4.0 on IBM rs6000

IDL> a = sqrt(-1)
% Program caused arithmetic error: Floating illegal operand
% Program caused arithmetic error: Square root of a negative
IDL> print, a
NaNQ
IDL> help, a
A FLOAT = NaNQ

Hmmm. Can't I get literally the same answer an all systems?

Norbert
[Message index]
 
Read Message
Previous Topic: Re: Include diagramming in your compiler, interpreter, debugger or editor!
Next Topic: RSI / CreaSo survey: Whish list

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

Current Time: Thu Oct 09 11:44:18 PDT 2025

Total time taken to generate the page: 1.52182 seconds