def METHOD_NAME():
  # test the detwinning
  i1=3.5
  i2=2.5
  s1=0.01
  s2=0.01
  a=0.25
  tmp = detwin( i1,s1,i2,s2,a)
  assert approx_equal( tmp.xm, 2.0, eps=1e-4)
  assert approx_equal( tmp.ym, math.sqrt(2.0), eps=1e-4)
  # test the variance covariance matrix.
  # when the twin fraction is 0, we have two independent observations!
  i1=4.0
  i2=9.0
  s1=0.1
  s2=0.1
  a=0.0
  tmp = detwin( i1,s1,i2,s2,a)
  ttt = (i2*i2+2*s2*s2)**0.25
  ttt = s2/(2*ttt)
  assert approx_equal( tmp.vcv[1], ttt*ttt, eps=1e-5)
  ttt = (i1*i1+2*s1*s1)**0.25
  ttt = s1/(2*ttt)
  assert approx_equal( tmp.vcv[0], ttt*ttt, eps=1e-5)
  assert approx_equal( tmp.vcv[2], 0 , eps=1e-8)
  i1=4000.0
  i2=3500.0
  s1=10
  s2=12
  a=0.5
  tmp = detwin( i1,s1,i2,s2,a)
  assert approx_equal([tmp.xm, tmp.ym], [61.6048502913, 61.6038732295])