Agena is an easy-to-learn procedural programming language suited to be used in scientific, educational, linguistic, and many other applications, including scripting.
What’s new in version 6.6.0
New Features
New mpf.argument computes the phase angle (principal argument) of a real or complex MPFR number.
New mpf.polygen: Accepts a table of coefficients (Agena numbers, real or complex MPFR numbers) and returns a polynomial function that can be evaluated at any given point. Example:
> import mpf;
> coeff := [mpf.new(5, 1), mpf.new(3, 1), mpf.new(1, 1)]; # complex coefficients in descending order
> f := mpf.polygen(coeff); # creates f := <: x -> coeff[1]*x**2 + coeff[2]*x + coeff[3] :>
> f(mpf.new(1, 0)):
cmpf(9.000000000000000000000000000000000000000, 3.000000000000000000000000000000000000000)
The new real-valued MPFR constant mpf.E defines mpf.new(exp(1)) ~ 2.718281828..
Fixes
Many MPFR functions mixed rounding modes internally which only became an issue if the user changed the default rounding mode, causing slightly wrong results. This has all been fixed.
Changes
When given a real MPFR number, mpf.precision now returns the precision of exactly this value.