|
[Date Index]
[Thread Index]
[Author Index]
Re: Request for Collective Wisdom...
- To: mathgroup at smc.vnet.net
- Subject: [mg88703] Re: Request for Collective Wisdom...
- From: David Bailey <dave at Remove_Thisdbailey.co.uk>
- Date: Tue, 13 May 2008 07:09:46 -0400 (EDT)
- References: <fvpcoc$met$1@smc.vnet.net>
Here is a second tip.
If a calculation is going very slowly, don't jump to the conclusion that
you need to use a more functional programming style - at least without a
little investigation. A spectacular way to consume machine time is to
create an algorithm - say an iterative approximation to a square root -
that is meant for real data, and then give it an argument such as Sqrt[3]/2.
If the algorithm does not use explicit real numbers, and does not use N
for example, it will build up a huge expression involving roots and
fractions. This is particularly subtle if you simply give the output to
Plot - which will apply N - your calculation will run extremely slowly
and yet appear to work (if it ever terminates).
David Bailey
http://www.dbaileyconsultancy.co.uk
Prev by Date:
Re: FullForm OK but StandardForm fails
Next by Date:
Re: Request for Collective Wisdom...
Previous by thread:
Re: Request for Collective Wisdom...
Next by thread:
Re: Request for Collective Wisdom...
|