Mathematica 3.0: reliability close to LogZero?
- To: mathgroup at smc.vnet.net
- Subject: [mg24514] Mathematica 3.0: reliability close to LogZero?
- From: William Boyd <william at kamaz.demon.co.uk>
- Date: Thu, 20 Jul 2000 03:01:50 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Could I ask an expert to cast a jaded eye over the following: is there
something wrong with Log close to zero in Mathematica 3.0?
All I'm doing is calculating the number of terms needed to reach a given
sum in the geometric series: following is typical: the values are the
first few terms of a denary limit sequence tending to 1/636, bar the
last ordinate which is last digit failsafed: I hope I am working to 50
digit precision (I do find The Book hard work at times) - even if I'm
not it should surely be better than this?. The first Log you see in
'result' is the one tending to zero. So we are doing LogZero / LogOne,
which is a test of course, but not such a hard test.
<<start cut and paste of Mathematica 3.0 notebook: formula is slightly
different from standard as I am modelling with first term of series
n*(1-r) >>
result[n_Real,s_Integer,r_Real]:=
Floor[SetPrecision[Log[ 1 - r*s/(n*(1 - r))] / Log[1 - r],50]] + 1
result[1.,635,0.001572327044025]
19022
result[1.,635,0.0015723270440251]
19667
result[1.,635,0.00157232704402515]
20971
result[1.,635,0.001572327044025157]
23347
result[1.,635,0.0015723270440251572]
23347
result[1.,635,0.00157232704402515722]
\[Infinity]
<< finish >>
On the face of it, this isn't impressive. Compare my results for the
same formula with the same ordinates using the Extended type (19/20 sig
figs) in Delphi 3, which gives {19022, 19665, 20979, 23163, 24409,
25008}, while a binary divide algorithm in Delphi using a tried and
trusted integer power raise of mine (no logs) gives {19022, 19665,
20979, 23163, 24410, 25014}.
Comments appreciated.
sincerely,
--
William Boyd
- Follow-Ups:
- Re: Mathematica 3.0: reliability close to LogZero?
- From: Daniel Lichtblau <danl@wolfram.com>
- Re: Mathematica 3.0: reliability close to LogZero?