adic 0.5.1

Arithmetic and rootfinding for p-adic numbers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/// Helper trait for display
///
/// Has digits that be represented by a string, without dressings like `.` or `_p`.
pub (crate) trait HasDigitDisplay {

    type DigitDisplay;

    /// A string representing just the digits of this adic number; used to Display the integer.
    ///
    /// ```
    /// # use adic::{EAdic, ZAdic};
    /// assert_eq!("(4)31._5", EAdic::new_neg(5, vec![1, 3]).to_string());
    /// assert_eq!("(24)31._5", EAdic::new_repeating(5, vec![1, 3], vec![4, 2]).to_string());
    /// assert_eq!("...3412._5", ZAdic::new_approx(5, 4, vec![2, 1, 4, 3]).to_string());
    /// ```
    fn digit_display(&self) -> Self::DigitDisplay;

}