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

Home » Public Forums » archive » Re: Need Math Instruction
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: Need Math Instruction [message #83437 is a reply to message #83436] Wed, 06 March 2013 19:25 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
wlandsman writes:

> An exponent has higher precedence that negation. So
>
> IDL> print,(-0.5)^(0.5)
> -NaN
> % Program caused arithmetic error: Floating illegal operand
>
> i.e. you can't take the square root of a negative number, but
>
> IDL> print,-0.5^(0.5)
> -0.707107
>
> says to negate the result of 0.5^(0.5)

Ah, Occam's Razor again. I had conspiracy theories in mind. ;-)

Thanks!

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
Previous Topic: Grid lines misaligned when using CONTOUR and MAP_SET
Next Topic: Need Math Instruction

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

Current Time: Fri Oct 10 09:20:50 PDT 2025

Total time taken to generate the page: 0.87945 seconds