View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Mike Middleton Mike Middleton is offline
external usenet poster
 
Posts: 762
Default with SP2, has the rand() function been slowed down ?

zan -

The slowdown is most likely due to the increased precision of the normal
inverse function in Excel 2003.

There are Knowledge Base articles at www.microsoft.com describing some of
the changes. The improvements in precision require more calculations.

Instead of using Excel's normal inverse function, you could substitute some
VBA code using the well-documented Box-Muller method for obtaining normal
random numbers. Search groups.google.com for examples.

Or, download the tryout version of my RiskSim add-in, available from
www.treeplan.com, and use its RandNormal function.

- Mike
www.mikemiddleton.com

"zan" wrote in message
...
Actually, the formula I am using is : normsinv(rand()), so the slowdown
could
be caused by normsinv as well.

"zan" wrote:

I have a spreadsheet in which I do some Monte Carlo simulations and use
the
rand() function in around 350000 cells. Before upgrading to excel
2003/SP2,
this sheet would calculate in around 20 seconds. After the "upgrade" it
now
runs in around 90 seconds. Is there any way for me to recoup the speed
without going back to the old configuration ? Why the slowdown ?