Skip to content

bigfloat version 0.4.0

Latest
Compare
Choose a tag to compare
@mdickinson mdickinson released this 30 Dec 17:17
415567c

Release date: 2019-12-30

This minor release adds a number of small features, changes the default
context to match IEEE 754 quadruple precision (binary128), and fixes support
for recent Python versions.

Thanks to Hugo van Kemenade for contributions to this release.

New Features

  • Wrap mpfr_buildopt_gmpinternals_p and mpfr_buildopt_tune_case. (#54)

  • Add bigfloat.__version__ (#46).

  • Add bigfloat.notequal. (#47)

  • Add format support. (#58).

  • Add support for round, math.floor, math.ceil, math.trunc on
    Python 3. (#64)

  • Add support for divmod and the // operator. (#69)

  • New floordiv and mod functions. The new mod replaces the old
    mod function, which has been renamed to fmod. (#69)

Changes

  • The default context now matches IEEE 754 quadruple precision instead
    of double precision. (#72, #89, #87)

  • Infinities and NaNs are now represented as 'inf' and 'nan' rather
    than 'Infinity' and 'NaN', for consistency with the float type, and
    for consistency with the newly-introduced string formatting.

  • The 'mod' function now follows Python sign conventions; the old
    'mod' function has been renamed to 'fmod'. The '%' operator
    now also follows Python sign conventions. (#69)

  • MPFR version 3.0.0 or later is required.

  • Support for Python versions earlier than 3.5 or 2.7 has been dropped.
    Support for Python 3.7 and 3.8 has been added. (#75, #81).

Bugfixes

  • The root function was accidentally wrapping cbrt (#60).
    Now fixed (#62).

  • Fix a test failure with Mpfr 4.0, that was due a change in the value
    of MPFR_PREC_MIN. (#77)

  • Fix initialization of the context on background threads. (#91)

  • Fix unit tests that changed the context and didn't reset their changes.
    (#92, #98)

Build

  • Use language_level=3 in the Cython code. (#96)

Documentation

  • Installation documentation cleaned up. (#68)

  • Add cmp to list of shadowed builtins in README.rst. (#63)

  • Fix (outdated) uses of strings for rounding modes. (#57)