       Re: Re: Computation speeds: numerical vs symbolic

• To: mathgroup at smc.vnet.net
• Subject: [mg55928] Re: [mg55925] Re: Computation speeds: numerical vs symbolic
• From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
• Date: Sun, 10 Apr 2005 23:07:04 -0400 (EDT)
• References: <d2tfah\$ql7\$1@smc.vnet.net> <200504101054.GAA29067@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```On 10 Apr 2005, at 19:54, Jon Harrop wrote:

> AES wrote:
>> So, I'm just curious, how can a calculate and plot command like this
>> be so stunningly fast?  and the trivially simple symbolic integration
>> above be so slow?
>
> You could think of it as: the numerical work uses finite precision but
> the
> symbolic work uses infinite precision.
>
> Put another way, how high does the precision of the numerical routine
> need
> to be such that symbolic routine is faster?
>
> --
> Dr Jon D Harrop, Flying Frog Consultancy
> http://www.ffconsultancy.com
>
>

I do not think viewing symbolic computation as "infinite precision"
numerical computation really gets to the heart of the matter. In fact,
in many cases "finite precision" numerical computations will often be
slower than "infinite precision" ones. This happens when the algorithms
used are essentially trivial like in this example:

In:=
With[{x=Sqrt},Table[x^(2*n),{n,1,10000}]];//Timing

Out=
{0.17 Second,Null}

vs.

In:=
With[{x=N[Sqrt,20]},Table[x^(2*n),{n,1,10000}]];//Timing

Out=
{0.62 Second,Null}

However, most symbolic algorithms are highly non-trivial and usually
have very high complexity; in fact single exponential complexity  is
considered to be very reasonable in symbolic algebra.

Andrzej Kozlowski
Chiba, Japan
http://www.akikoz.net/andrzej/index.html
http://www.mimuw.edu.pl/~akoz/

```

• Prev by Date: Re: Re: simplified C API call in MathLink
• Next by Date: Re: cannot evaluate in HelpBrowser (Win XP)
• Previous by thread: Re: Computation speeds: numerical vs symbolic
• Next by thread: Re: Computation speeds: numerical vs symbolic