MathGroup Archive 2001

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

Search the Archive

RE: Problem to evaluate cube root of a negative cube nember where a real value is expected

  • To: mathgroup at smc.vnet.net
  • Subject: [mg28092] RE: [mg28042] Problem to evaluate cube root of a negative cube nember where a real value is expected
  • From: "David Park" <djmp at earthlink.net>
  • Date: Fri, 30 Mar 2001 04:12:45 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Gary,

Use the following package:

Needs["Miscellaneous`RealOnly`"]

(-8)^(1/3)
-2

Ted Ersek has a somewhat better version of the package called
Miscellaneous`SwitchableRealOnly` which can probably be obtained at
MathSource. It allows you to turn the RealOnly feature on and off and
generally works better.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/

> From: Gary [mailto:garylga at magix.com.sg]
To: mathgroup at smc.vnet.net
>
> Hi,
>
> Does anyone know a simplier way to simplify (-8)^(1/3)=(-2) other
> than what
> I did below because no complex answer is expected in the solution.
>
> In[161]:=
> p=(-8)^(1/3)
> q=Abs[p]
> Level[p,3]
> r=Extract[Level[p,3],2]
> (* if p is real, then p should be as below *)
> q*r
>
> Out[161]=
> \!\(2\ \((\(-1\))\)\^\(1/3\)\)
>
> Out[162]=
> 2
>
> Out[163]=
> \!\({2, \(-1\), 1\/3, \((\(-1\))\)\^\(1/3\)}\)
>
> Out[164]=
> -1
>
> Out[165]=
> -2
>
>
> ______________________________________
> Gary Lee Guanan (garylga at magix.com.sg)
> Director - Business Development
> IQExplorers.com Pte Ltd
> Tel 874-1345/6
> ========================C/o Address============================
> Incubation Centre, School of Computing(SoC),  NUS.
> S15 #01-09, 1 Science Drive 2 (along Lower Kent Ridge Road), S117543
> ===============================================================
>
>



  • Prev by Date: Re: Defining a flat, orderless, one-identical function?
  • Next by Date: pde's
  • Previous by thread: Re: Problem to evaluate cube root of a negative cube nember where a real value is expected
  • Next by thread: Re: Problem to evaluate cube root of a negative cube nember where a real value is expected