/* 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="log2Example.mpl"; commandMaple="maple -q < log2Example.mpl"; a=-1b-9; b=1b-9; d=[a;b]; f=log2(1+x); p = x * (117045327009867803036301574157545b-106 + x * ((-58522663504933901606981166592605b-106) + x * (8663094464742397b-54 + x * ((-6497320848515433b-54) + x * (2598928339549937b-53 + x * ((-541446114948727b-51) + x * 3712726891772213b-54)))))); dyadic=powers!; write > $filenameMaple "restart: Digits := 50: with(numapprox): log1p := x -> log(1+x): expm1 := x -> exp(x)-1: log2 := x -> log[2](x): 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: log2 := x -> log[2](x): 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=2!; rI = <[infnorm (p-f)/f in d, diam=1b-80]>; print "Arenairetools with dirtyinfnorm :", r; print "Arenairetools with infnorm, diam=1b-80:", _; write " ", ;