English

Implementing p-adic numbers in Macaulay2 using its foreign function interface and FLINT

Algebraic Geometry 2026-04-21 v1 Number Theory

Abstract

Macaulay2 is a computer algebra platform widely used by researchers in algebraic geometry and commutative algebra. Using the ForeignFunctions package, it is possible to make calls from Macaulay2 to dynamic libraries such as FLINT. We demonstrate this by introducing a new Macaulay2 package implementing p-adic numbers using FLINT via this interface. We discuss implementation details such as memory allocation, interaction with Macaulay2's garbage collector, and object-oriented design decisions that mirror the existing implementations of the real and complex number fields in Macaulay2.

Keywords

Cite

@article{arxiv.2604.16799,
  title  = {Implementing p-adic numbers in Macaulay2 using its foreign function interface and FLINT},
  author = {Douglas A. Torrance},
  journal= {arXiv preprint arXiv:2604.16799},
  year   = {2026}
}

Comments

7 pages

R2 v1 2026-07-01T12:15:40.968Z