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

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

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

Go to the source code of this file.

Typedefs

typedef M2::ConcreteRing< M2::ARingCCCRingCCC

Functions

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

Detailed Description

gtest coverage for the legacy RingCCCConcreteRing<M2::ARingCCC> glued back into the ring_elem API.

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

Tests the MPC-backed arbitrary-precision complex ring through the legacy Ring surface the interpreter still uses, exercising the aring-glue.hpp ConcreteRing<> wrapper end-to-end. The complex almostEqual checks the real (BIGCC_RE) and imaginary (BIGCC_IM) components of R.subtract(a, b) against an MPFR epsilon built at fixed 100-bit precision and scaled to 2^-nbits; both components must be within tolerance for the elements to count as equal. getElement<RingCCC> follows the family pattern of the [-25, 24] integer prefix plus random complex draws.

Sibling of RingRRRTest.cpp (MPFR real glue) and the modern counterpart ARingCCCTest.cpp (templated path); together with the rest of the file-ring-tests family they keep the legacy ring_elem API in sync with the modern aring backends.

See also
RingTest.hpp
aring-glue.hpp
RingRRRTest.cpp
ARingCCCTest.cpp

Definition in file RingCCCTest.cpp.