Macaulay2 Engine
Loading...
Searching...
No Matches
aring-RRR.cpp
Go to the documentation of this file.
1
#include "
aring-RRR.hpp
"
2
3
namespace
M2
{
4
5
void
ARingRRR::text_out
(
buffer
&o)
const
{ o <<
"ARRR_"
<<
mPrecision
; }
6
void
ARingRRR::elem_text_out
(
buffer
&o,
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 << ≈
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:
aring-RRR.hpp
M2::ARingRRR — arbitrary-precision real numbers backed by MPFR.
M2::ARingRRR::mPrecision
unsigned long mPrecision
Definition
aring-RRR.hpp:336
M2::ARingRRR::ElementType
elem ElementType
Definition
aring-RRR.hpp:77
M2::ARingRRR::text_out
void text_out(buffer &o) const
Definition
aring-RRR.cpp:5
M2::ARingRRR::elem_text_out
void elem_text_out(buffer &o, const ElementType &a, bool p_one, bool p_plus, bool p_parens) const
Definition
aring-RRR.cpp:6
buffer
Definition
buffer.hpp:55
M2
Definition
aring-CC.cpp:3
Macaulay2
e
aring-RRR.cpp
Generated on
for Macaulay2 Engine by
1.15.0