The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Revision history for Math-AnyNum

0.22    2018-02-17

        [ADDITIONS]

            - is_smooth(n, k)           :: returns a true value when all the prime factors of `n` are <= `k`
            - polymod(n, a, b, c, ...)  :: computes the polymod of `n` against a list of numbers.
            - subfactorial(n,k)         :: computes the number of derangements of a set with `n` elements with `k` fixed points.
            - multinomial(a, b, c, ...) :: computes the multinomial coefficient.

        [IMPROVEMENTS]

            - Minor performance improvement in the `mod(n,k)` method when `k` fits into a native unsigned integer.

        [OTHER]

            - Using the integer limits from Math::GMPq instead of POSIX. This makes POSIX no longer needed.

0.21    2018-01-25

        - Extended the `complex()` function to accept an additional argument, which specifies the imaginary part.
        - Reimplemented the `rat_approx()` method for much better performance (~3x faster).
        - More efficient conversion of Math::GComplex objects with Math::AnyNum components.

0.20    2018-01-05

        - Added parsing support for complex numbers in Cartesian form, such as "(3 4)" for "3+4i".
        - Fixed the result of the `atan2(x, y)` function, when `x` and `y` are complex numbers.

0.19    2017-12-09

        - Fixed some tests under mpfr-4.0.0.
        - `mpfr_root()` is deprecated since mpfr-4.0.0 and is no longer used under mpfr >= 4.0.0.
        - Using `mpfr_z_sub()` when mpfr >= 3.1.0 is available.
        - Using `mpfr_beta()` when mpfr >= 4.0.0 is available.

0.18    2017-11-22

        - Extended the `digits()` method to support arbitrary large bases.

            + Additionally, it returns the digits in reverse order, matching the output of the `.digits()` method from Ruby.

        - Fixed a minor issue in `rat(str)` to return NaN when `str` cannot be parsed as a fraction.
        - Fixed `polygonal_root(n, NaN)` to return `NaN` instead of `n`.
        - Minor optimizations for `x <=> 0`, `x == 0` and `x != 0`, when `0` is a native integer.

0.17    2017-11-04

        - Optimized `is_div(n, k)` when `n` and `k` are integers.
        - Optimized `kronecker(n, k)` when `k` is a native integer.
        - Improvements in `__bernfrac__(n)`, using a more optimized sieve for prime numbers.
        - Minor simplifications inside `faulhaber_sum(n)`.

0.16    2017-10-17

        - Fixed the numification of signed and unsigned integers close to the native integer limits.

0.15    2017-10-08

        - Bug-fix in `gcd(x, -y)` and `lcm(x, -y)`, when `y` is a native integer.
        - Minor internal optimizations.

0.14    2017-09-26

        [BUG-FIXES]

        - Fixed the sign in the results returned by the second-polygonal functions `polygonal_root2(n,k)` and `ipolygonal_root2(n,k)`.

0.13    2017-09-26

        [ADDITIONS]

        - acmp(x, y): absolute comparison of `x` and `y`.
        - polygonal(n, k): returns the nth k-gonal number.
        - polygonal_root(n, k): returns the k-gonal root of `n`.
        - polygonal_root2(n, k): returns the second k-gonal root of `n`.
        - ipolygonal_root(n, k): returns the integer k-gonal root of `n`.
        - ipolygonal_root2(n, k): returns the second integer k-gonal root of `n`.
        - is_polygonal(n, k): returns 1 when `n` is a k-gonal number.
        - is_polygonal2(n, k): returns 1 when `n` is a second k-gonal number.
        - faulhaber_sum(n, p): computes 1^p + 2^p + 3^p + ... + n^p, using Faulhaber's formula.

0.12    2017-09-18

        [ADDITIONS]

        - Added the `rat_approx(n)` function, which returns the smallest rational approximation for a given real number `n`.

        [IMPROVEMENTS]

        - The newly added functions in Math::MPFR-3.36, Rmpfr_q_div() and Rmpfr_z_div(), are now used by Math::AnyNum.

        [PERFORMANCE OPTIMIZATIONS]

        - Re-implemented all the methods without Class::Multimethods, which makes Math::AnyNum ~35% faster.
        - Many internal simplifications and optimizations.

0.11    2017-07-11

        [IMPROVEMENTS]

        - Extended the `rising_factorial(n, k)` and `falling_factorial(n, k)` for negative values of `k`.

        [PERFORMANCE IMPROVEMENTS]

        - Optimized `eta(n)` and `zeta(n)` for values of `n` that fit inside a native unsigned integer.

        [OTHER]

        - Fixed the number of skipped tests under old versions of GMP in t/integer_functions.t.

0.10    2017-07-09

        [ADDITIONS]

        - Added the `exp2(x)` and `exp10(x)` functions.
        - Added the `ipow2(x)` and `ipow10(x)` functions.
        - Added the `falling_factorial(n, k)` and `rising_factorial(n, k)` functions.

        [PERFORMANCE IMPROVEMENTS]

        - Faster stringification of floating-point numbers (including complex numbers).
        - Optimization in `mfactorial(n, m)` for native integers.
        - Optimization in `binomial(n, k)` for values of `n` that fit inside a native unsigned integer.

        [FIXES]

        - Fixed `eta(NaN)` to return `NaN` instead of `log(2)`.
        - Fixed `atanh(NaN)` to return `NaN` instead of `NaN+NaNi`.
        - Fixed the return value of `lgrt(+i)` and `lgrt(-i)`.

0.09    2017-05-30

        [ADDITIONS]

        - Added the `is_coprime(n, k)` function.

        [IMPROVEMENTS]

        - Minor simplification for `eta(1)`.
        - Minor optimization in `rand()` without arguments (when exported).
        - Extended the `rat(str)` function to parse a given decimal expansion as an exact fraction.
        - Re-implemented the `ilog(x, y)` function for better performance and to correctly handle arbitrary large integers.

        [PERFORMANCE IMPROVEMENTS]

        - ~4x faster algorithm in `bernfrac(n)`, due to Kevin J. McGown.

0.08    2017-05-08

        [PERFORMANCE IMPROVEMENTS]

        - Many internal simplifications and optimizations, which makes `Math::AnyNum` up to 30% faster.

        [FIXES]

        - Fixes a rounding error in ilog(n,b) when n is very large or when n is not a power of b.

0.07    2017-04-28

        [IMPROVEMENTS]

        - Minor optimization in `numify()` for integers and rationals.
        - Added checks for exact divisibility of two integers.
        - Optimized the gcd() and lcm() functions when the second argument is a native integer.
        - Documentation improvements.

        [FIXES]

        - Fixed the creation of very large constant integers in `:overload` mode.
        - Fixed the creation of binary, octal and hexadecimal constants that contain underscores (in `:overload` mode).

0.06    2017-04-18

        [ADDITIONS]

        - Added the `nude(x)` function.
        - Added the `conj(x)` function.
        - Added the `norm(x)` function.
        - Added the `reals(x)` function.
        - Added the `as_dec(x,y)` function.

        [IMPROVEMENTS]

        - Extended the `agm()` function to support complex numbers.
        - Extended the `as_frac()` function to accept an optional base.
        - Functions `inv(x)` and `neg(x)` are exportable.
        - Math::AnyNum->new() is considerably faster.
        - Many internal simplifications and optimizations.

        [FIXES]

        - Fixed a typo in `is_inf()` and `is_ninf()`.

0.05    2017-04-09

        [FIXES]

        - Fixed the (in)equality checks when one of the operands is NaN.
        - Comparing anything to NaN, now returns `undef` instead of `0`.

        [IMPROVEMENTS]

        - Refactored the method `is_power` to handle scalar arguments more efficiently.
        - Optimized the `root` and `iroot` method when the second argument is a scalar.

0.04    2017-04-08

        [FIXES]

        - Fixed some tests under GMP < 5.1.0 (thanks to Slaven Rezić; https://github.com/trizen/Math-AnyNum/issues/1).
        - Workaround in log10() with MPC < 1.0 (thanks to Slaven Rezić; https://github.com/trizen/Math-AnyNum/issues/1).

0.03    2017-04-08

        [IMPROVEMENTS]

        - Minor optimization in overloaded '-' and '/'.

        [FIXES]

        - Workaround for Math::GMPq::Rmpq_cmp_z() with a version of GMP older than 6.1.0. (https://rt.cpan.org/Public/Bug/Display.html?id=120910)
        - Minor-fix in the stringification of Math::MPFR objects with exponents and trailing zeros.

0.02    2017-04-03

        Require perl>=5.014.

0.01    2017-04-03

        First release.