Macaulay2 Engine
Loading...
Searching...
No Matches
aring-RRR.cpp
Go to the documentation of this file.
1#include "aring-RRR.hpp"
2
3namespace M2 {
4
5void ARingRRR::text_out(buffer &o) const { o << "ARRR_" << mPrecision; }
7 const ElementType &ap,
8 bool p_one,
9 bool p_plus,
10 bool p_parens) const
11{
12 (void) p_parens;
13
14 if (p_plus && mpfr_cmp_si(&ap, 0) > 0)
15 o << "+";
16
17 if (!p_one && mpfr_cmp_si(&ap, -1) == 0)
18 o << "-";
19 else if (p_one || mpfr_cmp_si(&ap, 1) != 0)
20 o << &ap;
21}
22
23}; // end namespace M2
24
25// Local Variables:
26// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
27// indent-tabs-mode: nil
28// End:
M2::ARingRRR — arbitrary-precision real numbers backed by MPFR.
unsigned long mPrecision
void text_out(buffer &o) const
Definition aring-RRR.cpp:5
void elem_text_out(buffer &o, const ElementType &a, bool p_one, bool p_plus, bool p_parens) const
Definition aring-RRR.cpp:6
Definition aring-CC.cpp:3