Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
fintarin committed Feb 6, 2024
1 parent 00293cd commit 00d61d5
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion include/fintamath/numbers/Real.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,21 @@ class Real final : public INumberCRTP<Real> {
};

inline size_t hash_value(const Real &rhs) noexcept {
std::cout << "FintamathRealTest " << rhs.getBackend().backend().data()[0]._mpfr_exp << ',' << rhs.getBackend().backend().data()[0]._mpfr_sign << '\n';
std::cout << "FintamathRealTest ";
std::size_t len = static_cast<size_t>(rhs.getBackend().backend().data()[0]._mpfr_prec / mp_bits_per_limb);
if (rhs.getBackend().backend().data()[0]._mpfr_prec % mp_bits_per_limb)
++len;

std::cout << len << ",{";

for (std::size_t i = 0; i < len; ++i)
std::cout << rhs.getBackend().backend().data()[0]._mpfr_d[i] << ',';

std::cout << "},";

std::cout << rhs.getBackend().backend().data()[0]._mpfr_exp << ',' << rhs.getBackend().backend().data()[0]._mpfr_sign;
std::cout << '\n';

return boost::hash<Real::Backend>{}(rhs.getBackend());
}

Expand Down

0 comments on commit 00d61d5

Please sign in to comment.