MathGroup Archive 2008

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

Search the Archive

Re: A interesting case

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92005] Re: A interesting case
  • From: dh <dh at metrohm.ch>
  • Date: Tue, 16 Sep 2008 19:26:14 -0400 (EDT)
  • References: <gal3j9$e0k$1@smc.vnet.net>


Hi Miguel,

I think Mathematica chooses what it considers the simplest form for an 

expression. By default the complexity of an expression is judged 

according to "LeafCount", thta is how many leaves there are if the 

expression is written as tree (by e.g. TreeForm). Now try:

LeafCount/@{a^(-2),2/a^2,3/a^2}

TreeForm/@{a^(-2),2/a^2,3/a^2}

and you will see that a^(-2) has less leaves than 1/a^2

hope this helps, Daniel

Miguel wrote:

> I have spent work hours with this case.

> 

> ToString[#,InputForm]&/@{1/a^2,2/a^2,3/a^2}

> {a^(-2),2/a^2,3/a^2}

> 

> When the numerator of a rational element is 1, the structure string is

> diferent. Why?

> 





-- 



Daniel Huber

Metrohm Ltd.

Oberdorfstr. 68

CH-9100 Herisau

Tel. +41 71 353 8585, Fax +41 71 353 8907

E-Mail:<mailto:dh at metrohm.com>

Internet:<http://www.metrohm.com>




  • Prev by Date: Re: how to test where a list contains constant(s) or not
  • Next by Date: Re: how to test where a list contains constant(s) or not
  • Previous by thread: Re: A interesting case
  • Next by thread: how to test where a list contains constant(s) or not