MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: (-8)^(1/3)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31321] Re: (-8)^(1/3)
  • From: "David W. Cantrell" <DWCantrell at sigmaxi.org>
  • Date: Sun, 28 Oct 2001 03:07:00 -0500 (EST)
  • References: <9rdg8k$7p7$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"David Park" <djmp at earthlink.net> wrote:
> LuisMa,
>
> Needs["Miscellaneous`RealOnly`"]
>
> (-8)^(1/3)
> -2
>
> Ted Ersek has a nice package on MathSource called SwitchableRealOnly. It
> works somewhat better than RealOnly and also allows you to turn RealOnly
> on and off without having to kill the kernel.

Yes, this is basically the only way that you'll get _literally_
(-8)^(1/3) to return -2. But another option which will work, if
you simply need a real cube root function, is to define your own
function, perhaps named RealCbrt, to be Sign[x]*(Abs[x])^(1/3).
Then RealCbrt[-8] yields -2, as desired.

  David Cantrell

-- 
-------------------- http://NewsReader.Com/ --------------------
                    Usenet Newsgroup Service


  • Prev by Date: Re: Solving NL-PDE by (Mathematica) NDSolve?
  • Next by Date: Integration problem / internal error ?
  • Previous by thread: Re: (-8)^(1/3)
  • Next by thread: Solution for coupled PDE via Mathematica