6

Is there a library for large precision complex numbers in Python?

tshepang
  • 12,111
  • 21
  • 91
  • 136
eddie
  • 170
  • 7

2 Answers2

3

Take a look at mpmath which offers real and complex floating-point arithmetic with arbitrary precision.

Sk1d
  • 17
  • 4
David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
0

You can also try numpy (official website).

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Gordon Seidoh Worley
  • 7,839
  • 6
  • 45
  • 82
  • Does numpy do arbitrary precision floating point? – David Heffernan Mar 08 '11 at 13:45
  • Hmm, looking at the documentation, it looks like it supports up to 256 bit complex numbers (two 128 floats), supposing your platform supports it. Since numpy has a certain focus on speed, looks like you're limited to what can be supported natively by your computer. – Gordon Seidoh Worley Mar 10 '11 at 01:25