Macaulay2 Engine
Loading...
Searching...
No Matches
aring-RRi.cpp
Go to the documentation of this file.
1#include "aring-RRi.hpp"
2
3namespace M2 {
4
5void ARingRRi::text_out(buffer &o) const { o << "ARRi_" << 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)
15 o << "+";
16
17 // TODO: how do we want to handle -1? intervals w/ matching endpoints?
18 if (p_one || mpfr_cmp_si(&ap.left, 1) != 0 || mpfr_cmp_si(&ap.right, 1) != 0)
19 o << &ap;
20}
21
22}; // end namespace M2
23
24// Local Variables:
25// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
26// indent-tabs-mode: nil
27// End:
M2::ARingRRi — certified real intervals [a, b] with MPFR endpoints, MPFI arithmetic.
unsigned long mPrecision
void elem_text_out(buffer &o, const ElementType &a, bool p_one, bool p_plus, bool p_parens) const
Definition aring-RRi.cpp:6
void text_out(buffer &o) const
Definition aring-RRi.cpp:5
Definition aring-CC.cpp:3