Re: Re: Re: Numerical Problem
- To: mathgroup at smc.vnet.net
- Subject: [mg107101] Re: [mg107062] Re: [mg107044] Re: Numerical Problem
- From: Andrzej Kozlowski <akozlowski at gmail.com>
- Date: Wed, 3 Feb 2010 06:07:13 -0500 (EST)
- References: <201001291249.HAA29176@smc.vnet.net> <4B6318FC.3020402@wolfram.com> <hk17nr$oja$1@smc.vnet.net> <201002011113.GAA22665@smc.vnet.net> <7414ba0d1002010448i4ce34b3cs1ef8a710763509ec@mail.gmail.com> <201002020825.DAA08568@smc.vnet.net>
On 2 Feb 2010, at 09:25, Richard Fateman wrote: > And again, just doing 40 decimal digits (maybe 135 bit floating-point > fraction) you can get a pretty good answer, > even in Mathematica, except that Mathematica will tell you it can't. > Just insert the occasional SetPrecision. But there is a standard and easy way to do this in Mathematica, that you have been told about many times, and which does not require inserting "SetPrecision". And 20 digits (rather than 40) is enough. epcms[h_, y_List, f_List] := y + N[1/2, 20]*h (f.y + f.(y + h f.y)) fepcms[h_, t0_, tmax_, y0_List, f_List] := NestList[epcms[h, #, f] &, y0, 10] app1 = Block[{$MinPrecision = 20, $MaxPrecision = 20}, fepcms[1/10, 0, 1, {2, -1}, {{998, 1998}, {-999, -1999}}]] Andrzej Kozlowski
- References:
- Re: Numerical Problem
- From: Richard Fateman <fateman@cs.berkeley.edu>
- Re: Re: Numerical Problem
- From: Richard Fateman <fateman@cs.berkeley.edu>
- Re: Numerical Problem