Question: Why does Maple not plot 0 for these two equivalent expressions?


In the following workbook, I defined two equivalent one variable functions and plot their difference.

I'm surprised to see that the difference is not 0 between 55 and 60. But when I computed the respective function's values at these points, the difference is 0.

assume(n, integer, n > 0)

``

f := proc (n) options operator, arrow; 2^(n+10) end proc

proc (n) options operator, arrow; 2^(n+10) end proc

(1)

g := proc (n) options operator, arrow; 1024*2^n end proc

proc (n) options operator, arrow; 1024*2^n end proc

(2)

g(n)-f(n)

1024*2^n-2^(n+10)

(3)

"->"

 

``

map(f, [seq(i, i = 55 .. 60)])

[36893488147419103232, 73786976294838206464, 147573952589676412928, 295147905179352825856, 590295810358705651712, 1180591620717411303424]

(4)

map(g, [seq(i, i = 55 .. 60)])

[36893488147419103232, 73786976294838206464, 147573952589676412928, 295147905179352825856, 590295810358705651712, 1180591620717411303424]

(5)

[36893488147419103232, 73786976294838206464, 147573952589676412928, 295147905179352825856, 590295810358705651712, 1180591620717411303424]+[-36893488147419103232, -73786976294838206464, -147573952589676412928, -295147905179352825856, -590295810358705651712, -1180591620717411303424]

[0, 0, 0, 0, 0, 0]

(6)

``


 

Download temp.mw

Please Wait...