MathGroup Archive 2009

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

Search the Archive

Re: Simplify

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98672] Re: Simplify
  • From: Raffy <raffy at mac.com>
  • Date: Thu, 16 Apr 2009 04:12:28 -0400 (EDT)
  • References: <gs47pv$7tv$1@smc.vnet.net>

On Apr 15, 2:01 am, dh <d... at metrohm.com> wrote:
> Hi,
>
> can somebody explain, why
>
> Simplify[x^2/y^2,ComplexityFunction->LeafCount]
>
> does not simplify to (x/y)^2, although the LeafCount is:
>
> LeafCount[Hold[x^2/y^2]] gives 10
>
> and
>
> LeafCount[Hold[(x/y)^2]] gives 8
>
> Daniel

Hold[x^2/y^2] // FullForm ==> Hold[Times[Power[x,2],Power[Power[y,
2],-1]]]
x^2/y^2 // FullForm  ==>  Times[Power[x,2],Power[y,-2]]

x^2/y^2 // LeafCount ==> 7


  • Prev by Date: Re: Uninstalling Mathematica from Linux
  • Next by Date: Re: hyperlink problem in a ActionMenu
  • Previous by thread: Re: Simplify
  • Next by thread: Re: Simplify