Macaulay2 Engine
Loading...
Searching...
No Matches
RingRRRTest.cpp File Reference

gtest coverage for the legacy RingRRRConcreteRing<M2::ARingRRR> glued back into the ring_elem API. More...

#include "RingTest.hpp"
#include "aring-glue.hpp"
#include "aring-RRR.hpp"

Go to the source code of this file.

Typedefs

typedef M2::ConcreteRing< M2::ARingRRRRingRRR

Functions

bool almostEqual (const RingRRR *R, int nbits, ring_elem a, ring_elem b)
template<>
ring_elem getElement< RingRRR > (const RingRRR &R, int index)
 TEST (RingRRR, create)
 TEST (RingRRR, ones)
 TEST (RingRRR, negate)
 TEST (RingRRR, add)
 TEST (RingRRR, subtract)
 TEST (RingRRR, multDivide)
 TEST (RingRRR, axioms)
 TEST (RingRRR, power)
 TEST (RingRRR, syzygy)

Detailed Description

gtest coverage for the legacy RingRRRConcreteRing<M2::ARingRRR> glued back into the ring_elem API.

Note
AI-generated documentation. Verify against the source before relying on it.

Tests the MPFR-backed arbitrary-precision real ring through the legacy Ring surface that the interpreter still uses, which means exercising the aring-glue.hpp ConcreteRing<> wrapper end-to-end: the getElement<RingRRR> specialisation uses the deterministic [-25, 24] prefix plus R.random() for the rest, and almostEqual builds an mpfr_t epsilon scaled to 2^-nbits against R.subtract(a, b).get_mpfr(). Bugs in the glue (from_long mappings, init / clear lifecycle, random plumbing) surface here before they appear as user-visible misbehaviour through globalRR.

Companion to RingZZTest.cpp, RingZZpTest.cpp, RingQQTest.cpp, RingCCCTest.cpp, and RingTowerTest.cpp (all file-ring-tests); the modern aring-only counterpart is ARingRRRTest.cpp, which exercises the same MPFR backend through the templated path.

See also
RingTest.hpp
aring-glue.hpp
aring-RRR.hpp
ARingRRRTest.cpp

Definition in file RingRRRTest.cpp.