MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to automate a huge amount of computation that involve basic arithmetic operations with $p$-adic numbers. I have found a Mathematica packages for it, but it is old and acts quite erratically. Do you know of any computational software that does it reliably?

share|cite|improve this question
Could you be more explicit about just which operations you want to do, and where (as in, what $p$-adic fields)? And could you say more fully what you mean by "automate"? – Lubin Jun 30 '11 at 17:18
up vote 8 down vote accepted

SAGE has p-adic arithmetic (for example, see, and has the added benefit of being completely free and open-source!

share|cite|improve this answer

This is just a very partial answer that is based on my experience trying to do some work with extension of p-adic numbers.

There is p-adic arithmetic in the free software programs SAGE, PARI and GAP, but their main limitation (i don't know if things have changed recently) was their inability to with relative extension, that is extensions of another field which is itself a proper extension of $\mathbb{Q}_p$. However if you have limited need for extensions they (mostly SAGE and PARI, because GAP is more group-theory oriented) have a very good interface to work with p-adic numbers.

For my thesis work i absolutely needed relative extensions, so i had to use Magma which is not free, but for small computation it can be used online: It has a very good library, which requires some time to learn, like the magma language which requires some learning too, but however the functionality provided is worth the effort.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.