P-adic numbers

crate documentation minimum rustc 1.31

A collection of tools for p-adic numbers in Rust.

This includes a p-adic type and a rational type.

Status

This library is currently in development. It is not yet ready for use.

Usage

Add this to your Cargo.toml:

toml [dependencies] padic = "0.1.1"

rust use padic::Ratio; let r = Ratio::new(2, 5); let p = r.to_padic(3, 10); assert_eq!(p.valuation, 0); assert_eq!(p.expansion, vec![1, 1, 2, 1, 0, 1, 2, 1, 0, 1]);

```

From rational number to p-adic number

Helpers functions

TODOs

License

MIT