Re: [R] R: to the power

From: François Pinard <>
Date: Sun 17 Jul 2005 - 06:49:21 EST

[Thomas Lumley]

> It would be nice if R could realize that you meant the cube root
> of -8, but that requires either magical powers or complicated and
> unreliable heuristics. The real solution might be a function like
> root(x,a,b) to compute x^(a/b), where a and b could then be exactly
> representable integers. If someone wants to write one...

While this could be done with moderate difficulty for the simpler cases, one cannot reasonably ask R to be and do everything. :-)

So far, I see R more on the numerical side of things. If you want precise, exact solutions to various mathematical problems, you might consider installing a Computer Algebra System on your machine, next to R, for handling the symbolic side of things.

One such system which is both free and very capable might be Maxima. Its convoluted story is rooted 40 years in the past. Some may say it lacks some chrome and be mislead; don't be, the engine is pretty solid. Peek at if you think you need such a beast. Beware: to use it, you need either GCL or Clisp pre-installed.

François Pinard

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Sun Jul 17 06:53:45 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:46 EST