|
Macaulay2 Engine
|
gtest coverage for the MPFI-backed M2::ARingRRi real-interval aring. More...
#include <cstdio>#include <string>#include <iostream>#include <sstream>#include <memory>#include <gtest/gtest.h>#include <mpfr.h>#include "aring-RRi.hpp"#include "aring-RRR.hpp"#include "aring-glue.hpp"#include "ARingTest.hpp"Go to the source code of this file.
Functions | |
| bool | almostEqual (const M2::ARingRRi &R, int nbits, const M2::ARingRRi::ElementType &a, const M2::ARingRRi::ElementType &b) |
| template<> | |
| void | getElement< M2::ARingRRi > (const M2::ARingRRi &R, int index, M2::ARingRRi::ElementType &result) |
| TEST (ARingRRi, create) | |
| void | testRingNegateRRi (const M2::ARingRRi &R, const M2::ARingRRR &S, int ntrials) |
| TEST (ARingRRi, negate) | |
| TEST (ARingRRi, add) | |
| TEST (ARingRRi, subtract) | |
| TEST (ARingRRi, multDivide) | |
| TEST (ARingRRi, axioms) | |
| TEST (ARingRRi, power_and_invert) | |
gtest coverage for the MPFI-backed M2::ARingRRi real-interval aring.
Drives M2::ARingRRi through the shared ARingTest.hpp harness with a precision-aware almostEqual tailored to interval semantics: an MPFR epsilon scaled to the ring's get_precision() is compared independently against the differences of the left and right endpoints of each mpfi_t-style element, so both bounds must agree to 2^-nbits for the elements to count as equal. Beyond the standard arithmetic battery, the interval-specific tests confirm (a + b) contains every a' + b' with a' ∈ a and b' ∈ b, that wide operations widen the result, and that empty intervals survive arithmetic intact.
Sibling of ARingRRTest.cpp, ARingRRRTest.cpp, ARingCCTest.cpp, and ARingCCCTest.cpp (all under the file-aring-real-complex-tests markdown). The aring-glue.hpp include pulls in the ConcreteRing wrapper so the legacy Ring-API surface routes back to the same MPFI backend.
Definition in file ARingRRiTest.cpp.