Macaulay2 Engine
Loading...
Searching...
No Matches

◆ elem_text_out()

void Z_mod::elem_text_out ( buffer & o,
const ring_elem f,
bool p_one = true,
bool p_plus = false,
bool p_parens = false ) const
virtual

Implements Ring.

Definition at line 114 of file ZZp.cpp.

119{
120 (void) p_parens;
121 int n = to_int(a.get_int());
122 if (n < 0)
123 {
124 o << '-';
125 n = -n;
126 }
127 else if (p_plus)
128 o << '+';
129 if (p_one || n != 1) o << n;
130}
int to_int(int a) const
Definition ZZp.cpp:73

References ring_elem::get_int(), and to_int().

Referenced by TEST().