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

Home » Public Forums » archive » Re: Old 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: Old Question [message #18312 is a reply to message #18178] Wed, 15 December 1999 00:00 Go to previous messageGo to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
Jacques Basson <jfb37@mrao.cam.ac.uk> writes:

> Ben Tupper wrote:
>>
>> Jacques Basson wrote:
>>
>>> Hi all
>>>
>>> Sorry, this has got to be an old question, but I can't seem to locate
>>> the answer. What is the way around the following problem?
>>>
>>> IDL> a = -1
>>> IDL> print, -1^(1./3)
>>> -1.00000
>>> IDL> print, a^(1./3)
>>> NaN
>>> % Program caused arithmetic error: Floating illegal operand
>>>
>>> Thanks
>>> Jacques
>>

(stuff deleted)

> I resorted to creating a simple function which basically does
> abs(a)^(1./3) * (2*(a gt 0) - 1)
> Slightly messy, but it works.

> Jacques

I agree that it doesn't generate any errors, but what is its physical or
mathematical meaning? The only justification I can think of for this would be
if negative values of A where physically meaningless, and only represented
measurement error. The above procedure would then preserve the distribution of
noise about zero without introducing any biases towards positive or negative
numbers. If that's the case, then I agree that the above procedure is proper.

William Thompson
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How do you access a field in a struct?
Next Topic: Re: Widget Frame Attributes on Linux

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

Current Time: Wed Oct 08 19:14:39 PDT 2025

Total time taken to generate the page: 0.00826 seconds