use console
double pp,p,m,v
pp=pi
p=pp/6
m=6
int i
for i=1 to 30
  v=m*sin(p)
  print i tab v tab pp-v cr
  m*=2
  p*=.5
next
print cr cr
'
'Subdividing slices of pie and measuring end of each slice
numberformat 19,1,0,0,0,0
double e,h,v,w,x,y,xx,yy,pp,m
int i
pp=pi
x=1 : m=6 : h=.5
for i=1 to 100
  'x*=h
  'xx=x*x
  'yy=1-xx
  'y=sqr yy
  'y=1-y 'produces little y
  'yy=y*y
  'xx=xx+yy
  'x=sqr xx
    fld1
    fld1
    fld   qword x
    fmul  qword h   'x*.5
    fmul  st0       'x*x
    fst   qword xx
    fsubp           'yy=1-xx
    fsqrt           'y
    fsubp           '1-y 'produces little y
    fmul  st0       'y*y
    fadd  qword xx  'xx+yy
    fsqrt           'new chord x
    fstp  qword x
  v=x*m
  w=pp-v
  if w=e then exit for 'precision limit
  print i tab v tab w cr
  e=w
  m=m+m
next
waitkey