Re: why extending numbers by zeros instead of dropping precision is a good idea
- To: mathgroup at smc.vnet.net
- Subject: [mg117985] Re: why extending numbers by zeros instead of dropping precision is a good idea
- From: Richard Fateman <fateman at cs.berkeley.edu>
- Date: Thu, 7 Apr 2011 08:05:45 -0400 (EDT)
On 4/4/2011 3:30 AM, Noqsi wrote: > On Apr 1, 1:34 am, Bill Rowe<readn... at sbcglobal.net> wrote: > >> It seems FixedPoint is doing something behind the scene that >> avoids the problem you describe above. > > Well, of course, a specialized function can use specialized error > estimation methods. > FixedPoint can be written in about one line. It needs a stopping criterion, SameTest which in Mathematica can be any function you choose or the system's mysterious "automatic". There is probably nothing much special in the default SameTest. I expect it is something like SameTest[x0_,x1_]:= Abs[(x1-x0)] < Abs[x0]*10^(Precision[x0]) ;; we assume x0 is not zero; else use x1 on rhs; If they are both zero, obviously the fixed point has been reached... I suspect this test is best executed in fixed precision, but maybe it doesn't matter much.