If you have an approximation x=a/b,then the error is less than
abs(x- a%b)%((b^2)SQR(5)).
Another more exact estimate gives for two sequential ratios c/d and f/g
for c/d an error  estimate 1%(d*g).
Leo Vohandu


> Members of the Forum -
>
> If I'm approximating, e.g. the square root of 3, with a matrix method
> which returns an extended precision numerator and denominator, when I
> work out the decimal equivalent of this, at what point do I run out of
> significant digits?
>
> For example,
>
>    (1 3,:1 1)&(+/ .*)^:(5+i.5)],.1 0  NB. Successive approximations of
> %:3
>   76
>   44
>
>  208
>  120
>
>  568
>  328
>
> 1552
>  896
>
> 4240
> 2448
>    (%:3)-%/(1 3,:1 1)&(+/ .*)^:10],.x: 1 0  NB. How far off are
> successive
> approximations?
> _6.6086991e_6
>    (%:3)-%/(1 3,:1 1)&(+/ .*)^:20],.x: 1 0
> _1.2607915e_11
>    (%:3)-%/(1 3,:1 1)&(+/ .*)^:30],.x: 1 0
> _2.220446e_16
>    (%:3)-%/(1 3,:1 1)&(+/ .*)^:40],.x: 1 0  NB. More than 16 digits
> 0
>    (1 3,:1 1)&(+/ .*)^:40],.x: 1 0    NB. How precise is this in
> decimal?
> 144052522725670912
>  83168762773110784
>    2^.(1 3,:1 1)&(+/ .*)^:40],.x: 1 0 NB. Bits/number - relevant?
> 56.999373
> 56.206891
>
> From the progression of exponents in the cases for 10, 20, and 30
> iterations, I'm guessing the answer should be about 21 significant
> digits but is there a way to better quantify this?
>
> Thanks,
>
> Devon
> --
> Devon McCormick, CFA
> ^me^ at acm.
> org is my
> preferred e-mail
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to