Exemplo n.º 1
0
def test_with( m ):
 a=fmpz_mat(m)
 good=flint.fmpz_mat_inverse( a )
 baad=flint.fmpz_triU_small_det_inverse( a )
 good_i,baad_i=good[0].export_sage(),baad[0].export_sage()
 if good[1] != baad[1] or good_i != baad_i:
  print 'test failed for a=\n',m
  if good[1] != baad[1]:
   print 'd good/bad=%s/%s' % (good[1],baad[1])
  else:
   print 'd=%s' % good[1]
  print 'good inv=\n',good_i
  if good_i != baad_i:
   print 'baad inv=\n',baad_i
  sys.exit(1)
def flint_1( A ):
 r0,r1=flint.fmpz_mat_inverse(A)
 return A,r0,r1