Implementing p-adic numbers in Macaulay2 using its foreign function interface and FLINT
Douglas A. Torrance

TL;DR
This paper introduces a new Macaulay2 package that implements p-adic numbers by interfacing with the FLINT library through Macaulay2's ForeignFunctions package, enhancing algebraic computation capabilities.
Contribution
It demonstrates how to integrate FLINT with Macaulay2 to implement p-adic numbers, detailing implementation and design considerations.
Findings
Successfully implemented p-adic numbers in Macaulay2 using FLINT
Addressed memory management and garbage collection interactions
Mirrored existing real and complex number implementations
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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
