|
Macaulay2 Engine
|
gtest coverage for the complex<double>-backed M2::ARingCC complex aring. More...
#include <cstdio>#include <string>#include <iostream>#include <sstream>#include <memory>#include <gtest/gtest.h>#include <mpfr.h>#include "aring-RR.hpp"#include "aring-CC.hpp"#include "ARingTest.hpp"Go to the source code of this file.
Functions | |
| bool | almostEqual (const M2::ARingCC &C, unsigned long nbits, const M2::ARingCC::ElementType &a, const M2::ARingCC::ElementType &b) |
| template<> | |
| void | getElement< M2::ARingCC > (const M2::ARingCC &C, int index, M2::ARingCC::ElementType &result) |
| TEST (ARingCC, create) | |
| void | testRingNegateCCC (const M2::ARingCC &C, int ntrials) |
| TEST (ARingCC, negate) | |
| TEST (ARingCC, add) | |
| TEST (ARingCC, subtract) | |
| TEST (ARingCC, multDivide) | |
| TEST (ARingCC, axioms) | |
| TEST (ARingCC, power_and_invert) | |
gtest coverage for the complex<double>-backed M2::ARingCC complex aring.
Plugs M2::ARingCC into the ARingTest.hpp harness, defines the complex almostEqual that compares the magnitude of a - b against a 2^-nbits epsilon resolved through the ring's real-side companion (C.real_ring()), and supplies the getElement<M2::ARingCC> specialisation that mixes the deterministic prefix elements (zero, one, i, near-overflow) with random complex draws. The same arithmetic / equality / inverse / negation battery testSomeMore runs is exercised over the full plane.
Companion to ARingCCCTest.cpp (MPC arbitrary-precision complex), ARingRRTest.cpp, ARingRRRTest.cpp, and ARingRRiTest.cpp — all under the same file-aring-real-complex-tests markdown. The cross-backend agreement check that ARingCCC at 53 bits stays within 2^-50 of ARingCC is the standard regression guard developers lean on when touching either of the complex paths.
Definition in file ARingCCTest.cpp.