/* This script illustrates the behavior between Maple and arenaireplot */ /* It is meant to be used with arenaireplot version 0.0.2.2-alpha */ /* WARNING: the parameter diam represents a *relative diameter*: */ /* To get the absolute maximal diameter of the zero boxes Delta, use */ /* the formula: Delta = diam * |I| */ /* where |I| denotes the diameter of the input interval I. */ filenameMaple="workedExample.mpl"; commandMaple="maple -q < workedExample.mpl"; a=-1/4; b=1/4; d=[a;b]; f=expm1(x); p=x*(1+x*(2097145b-22 + x*(349527b-21 + x * (87609b-21 + x*(4369b-19))))); dyadic=powers!; write > $filenameMaple "restart: Digits := 50: with(numapprox): log1p := x -> log(1+x): expm1 := x -> exp(x)-1: f := x -> ", f, ": p := x -> ", p, ": a := ", a, ": b:= ", b, ":\n"; write >> $filenameMaple "printf(\"Maple with 50 digits : %a\\n\", infnorm((p(x)-f(x))/f(x),x=a..b)):\n"; write >> $filenameMaple "restart: Digits := 100: with(numapprox): log1p := x -> log(1+x): expm1 := x -> exp(x)-1: f := x -> ", f, ": p := x -> ", p, ": a := ", a, ": b:= ", b, ":\n"; write >> $filenameMaple "printf(\"Maple with 100 digits : %a\\n\", infnorm((p(x)-f(x))/f(x),x=a..b)):\n"; bashexecute $commandMaple; verbosity=0!; dyadic=off!; r = ; taylorrecursions=0!; rI = <[infnorm (p-f)/f in d, diam=1b-26, proof="workedExampleProof.txt"]>; print "Arenairetools with dirtyinfnorm :", r; print "Arenairetools with infnorm, diam=1b-26:", _; write " ", ;