The Mathematica Journal
Volume 9, Issue 2


In This Issue
Tricks of the Trade
In and Out
Trott's Corner
New Products
New Publications
News Bulletins
New Resources

Download This Issue 

About the Journal
Editorial Policy
Back Issues
Contact Information

p-adic Arithmetic
Stany De Smedt

Conversion to p-adics

Next we calculate the Hensel expansion of a p-adic number to a given precision. One may think of PadicN[n,p,k] as being a bit like N[n,k]. The internal representation is given as PadicRational[m,n,e,p]. PadicN[n,p] gives an eight-digit p-adic number; PadicN[n,p,k] gives digits. The numbers to the right of the radix point represent the positive powers, and the numbers to the left represent the negative powers.

The implementation to print these expansions is made in the third section of the package entitled "Printing of p-adics" where we use PadicDigits[m,n,e,p] as an auxiliary function to aid formatting.

Here are some examples.

About Mathematica | Download Mathematica Player
Copyright © Wolfram Media, Inc. All rights reserved.