Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: simplifying ^ fails, on exact numerical constants in Mathematica 5.0

  • To: mathgroup at smc.vnet.net
  • Subject: [mg62025] Re: simplifying ^ fails, on exact numerical constants in Mathematica 5.0
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Wed, 9 Nov 2005 03:45:55 -0500 (EST)
  • Organization: The University of Western Australia
  • References: <difr5c$fdt$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <difr5c$fdt$1 at smc.vnet.net>,
 "Richard J. Fateman" <fateman at eecs.berkeley.edu> wrote:

> Consider
> f[x_, y_, n_] :=  (x^n)^(y/n)
> 
> For x, y, positive rational numbers and n an integer
> this should compute exactly the same as x^y.
> 
> And indeed this seems to be the case

Indeed, 

  FullSimplify[(x^n)^(y/n), Element[n, Integers] && x > 0 && y > 0]

yields x^y. Moreover, for such parameters, one could code f as

  f[x_/; x >0, y_ /; y> 0, n_Integer] :=  x^y

> for
> f(1/4+1/10^18,  1/2,  n)
> 
> when n is 1,2,3 or 4.  But it comes up with a different
> answer when n is 5 or more  (using Mathematica 5.0).

Not in Mathematica 5.2.
 
> Are the answers different?  N[%-%%,1000] checks numerical
> equality, but this gives an meprec error....
> 
> Simplify[..] does not simplify to zero.
> 
> FullSimplify does better, if you are willing to wait
> long enough, (or n is small enough) and returns 0.
> 
>   Can a CAS do this right and fast?

Well, 5.2 does ok on this problem.

Cheers,
Paul

_______________________________________________________________________
Paul Abbott                                      Phone:  61 8 6488 2734
School of Physics, M013                            Fax: +61 8 6488 1014
The University of Western Australia         (CRICOS Provider No 00126G)    
AUSTRALIA                               http://physics.uwa.edu.au/~paul


  • Prev by Date: Re: Re: 5.2 on suse 10.0 error
  • Next by Date: Re: Bug in pattern parsing?
  • Previous by thread: Re: Fitting numerical data
  • Next by thread: Notation Package Precedence?