[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*Subject*: Re: Old Question*From*: thompson(at)orpheus.nascom.nasa.gov (William Thompson)*Date*: 15 Dec 1999 16:47:52 GMT*Newsgroups*: comp.lang.idl-pvwave*Organization*: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA*References*: <825pe3$ic9$1@pegasus.csx.cam.ac.uk> <3856FE95.B66C4961@tidewater.net> <38576913.6D6AAD01@mrao.cam.ac.uk>*Xref*: news.doit.wisc.edu comp.lang.idl-pvwave:17745

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

**References**:**Re: Old Question***From:*Ben Tupper

**Re: Old Question***From:*Jacques Basson

- Prev by Date:
**Another Color Twist** - Next by Date:
**Re: Old Question** - Prev by thread:
**Re: Old Question** - Next by thread:
**Re: Old Question** - Index(es):