[libre-riscv-dev] algebraic numbers library

Hendrik Boom hendrik at topoi.pooq.com
Tue Sep 17 14:57:47 BST 2019


On Mon, Sep 16, 2019 at 04:11:12AM -0700, Jacob Lifshay wrote:
> I've been writing an algebraic numbers library for a while with the
> intention that it could be used to create a reference by which we
> could test our IEEE 754 operations, since the numbers it represents
> are exact instead of approximated.
> 
> The main API is using RealAlgebraicNumber in
> https://salsa.debian.org/Kazan-team/algebraics/blob/master/src/algebraic_numbers.rs
> 
> the RealAlgebraicNumber type supports add, sub, mul, div (but not by
> zero), comparisons, raising to rational powers, floor, ceil, trunc,
> fract, conversion to rational numbers and integers (returning None if
> the number is not rational or integer), and conversions from rational
> numbers and integers.
> 
> It is based on polynomials over bigints, so the only restrictions are
> execution time and memory usage.

Is there any documentation about the algorithms you used and the 
mathematical theory behind them?

-- hendrik



More information about the libre-riscv-dev mailing list