3.0.0
This release contains breaking changes (see below.) However, these are mostly ABI changes. So, just recompile your code against this version of exact-real, and everything should work.
Added:
- Added support for Python 3.10. We now test automatically that everything in pyexactreal works in our CI for this version of Python.
- Added arithmetic operators with short and unsigned short operators to the C++ interface.
- Added division operators for
Element<IntegerRing>. An exact division is attempted. An exception is raised if such division is not possible in the integers. - Added explicit implementations of
Element::operator<,Element::operator>, andElement::operator==for basic integer types (this is slightly faster than calling through the long long operators.) - Added a benchmark for squaring of
Element. This is a very common operation,
e.g., when computing with the length of a vectorx*x + y*y.
Changed:
- Changed how arithmetic operators are organized in
ELement.hpp. This is a breaking change. Existing code needs to be rebuilt to link against the new symbol names. - Changed
RealNumber::deglex()slightly. Indeterminates are not ordered by their value but by their internal unique id. This is a breaking change.
Removed:
- Removed explicit support for Python 3.6. We do not explicitly test things for Python 3.6 anymore which had reached its end-of-life in 2021.
- Removed automatic promotion of a coefficient to an element, e.g., the implicit conversion of a
renf_elem_classto anElement<NumberField>which should be done explicitly since it can be quite costly. Existing code might have to replacexwithElement<NumberField>(x)in some places to restore the old behavior. (The same holds for the implicit conversion frommpz_classtoElement<IntegerRing>andmpq_classtoElement<RationalField>but these are probably more rare.) - Removed legacy arithmetic from the shared library that were deprecated since version 1.5.0. (There were quite a few other ABI changes, so this should not affect anybody since you'll need to rebuild things anyway.)
- Removed the static library from the conda package that we upload with every commit to the master branch to the flatsurf channel. To our knowledge nobody is using these builds. They can sometimes be useful for debugging because they are built with debug symbols (which is why they are very big.) Providing a static library that nobody should use anyway is eating up the limited storage on anaconda.org twice as fast so we disable this.
Fixed:
- Fixed
Element::rationalCoefficients(). The returned rationals are now always in canonical form. - Fixed serialization with cereal 1.3.1+ in the same way we did for e-antic in flatsurf/e-antic#242. We also fix a segfault that could happen when mixing different versions of cereal.
Performance:
- Improved creation of products of real numbers and modules by replacing shared pointer cache keys with integers.
- Improved performance of multiplication of real numbers and elements by keeping more modules and products alive in caches. (Before, when doing
x*xand there had been no reference to a parent of the result anymore, the parent module had to be recreated for every multiplication. Now we always keep the last 1024 such modules alive. This might require a bit of RAM but speeds up some computations substantially.) - Upgrade dependency unique-factory to version 0.1.0.