MathGroup Archive 2005

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

Search the Archive

Re: Re: how to find n in expression x^n using a pattern?


On 4 Jul 2005, at 18:32, Andrzej Kozlowski wrote:
>
> Timing[Cases[p[x], x^(n_.) -> n, {1}]]
>
>
> {0.0005019999999973379*Second, {5}}
>
> (as I wrote in my first response, giving the correct level  
> specification is important).
>

On the other hand, the default level specification for Cases is, of  
course, {1}...

Andrzej Kozlowski


  • Prev by Date: Re: Re: Can't assign value to symbols
  • Next by Date: Re: Re: how to find n in expression x^n using a pattern?
  • Previous by thread: Re: how to find n in expression x^n using a pattern?
  • Next by thread: Re: Re: how to find n in expression x^n using a pattern?