Starting find y=x^3
x = 0         y= 0 
x = 1         y= 1 
x = 2         y= 8 
x = 3         y= 27 
x = 4         y= 64 
x = 5         y= 125 
x = 6         y= 216 
x = 7         y= 343 
end phase
now lets do the differences
these are the differences
 0   0 
 1   1 
 2   6 
 3   6 
 4   0 
 5   0 
 6   0 
 7   0 
output phase
 x= 0  y= 0    1 %
 x= 1  y= 1    0 %
 x= 2  y= 8    0 %
 x= 3  y= 27   0 %
 x= 4  y= 64   0 %
 x= 5  y= 125                0 %
 x= 6  y= 216                0 %
 x= 7  y= 343                0 %
 x= 8  y= 512                0 %
 x= 9  y= 729                0 %
 x= 10  y= 1000              0 %
 x= 11  y= 1331              0 %
 x= 12  y= 1728              0 %
 x= 13  y= 2197              0 %
 x= 14  y= 2744              0 %
 x= 15  y= 3375              0 %
 x= 16  y= 4096              0 %
 x= 17  y= 4913              0 %
 x= 18  y= 5832              0 %
 x= 19  y= 6859              0 %
 x= 20  y= 8000              0 %
 x= 21  y= 9261              0 %
 x= 22  y= 10648             0 %
 x= 23  y= 12167             0 %
 x= 24  y= 13824             0 %
 x= 25  y= 15625             0 %
 x= 26  y= 17576             0 %
 x= 27  y= 19683             0 %
 x= 28  y= 21952             0 %
 x= 29  y= 24389             0 %
 x= 30  y= 27000             0 %
 x= 31  y= 29791             0 %
 x= 32  y= 32768             0 %
 x= 33  y= 35937             0 %
 x= 34  y= 39304             0 %
 x= 35  y= 42875             0 %
 x= 36  y= 46656             0 %
 x= 37  y= 50653             0 %
 x= 38  y= 54872             0 %
 x= 39  y= 59319             0 %
 x= 40  y= 64000             0 %
 x= 41  y= 68921             0 %
 x= 42  y= 74088             0 %
 x= 43  y= 79507             0 %
 x= 44  y= 85184             0 %
 x= 45  y= 91125             0 %
cheers



****** TurboBasic program to make above ******

print "hello, I am x-cubed"
print
print "regular diff equations

print
DIM stepval#(40)
DIM w#(40)

OPEN "x-cubed.txt" for OUTPUT as #2

print #2, "Starting find y=x^3
for x# = 0 to 7
    stepval#(x#)= x#*x#*x#
    print "x=", x#, "y=" stepval#(x#)
    print #2, "x =" x#, "y=" stepval#(x#)
next x#
print #2,"end phase

print #2,"now lets do the differences
for n% = 0 to  7
   w#(n%) = stepval#(0)
  '   print #2, " ** n="n%; " w="w#(n%)
   for i% = 0 to (7-n%)
   '    print #2, "      n=";n%; " i=";i%, stepval#(i%+1);" - "stepval#(i%);
       stepval#(i%) = stepval#(i%+1) - stepval#(i%)
    '   print #2, "=";stepval#(i%)
   next i%
next n%

' the  differences are now in w#()
print #2,"these are the differences
for n% = 0 to 7
  print n% " " w#(n%)
  print #2, n% " " w#(n%)
next n%
print 2#,"end of differences

print #2, "output phase
for n# = 0 to 45
  s# = n#*n#*n#
  if (s# <> 0) then
    e# = ((w#(0)-s#)*100)/s#
  else
    e# = 1
  end if
  print    " x=",n#;" y="; w#(0),  e#;"%"
  print #2, " x=";n#;" y="; w#(0),  e#;"%"
  for i% = 0 to 7
     w#(i%) = w#(i%) + w#(i%+1)
  next i%
next n#
print "cheers"
print #2, "cheers"