PackageTrack
Sign in Get early access

rational

The rational package allows you to deal with rational numbers.

2.2.3 681K downloads/mo #433 most downloaded on pub.dev a14n/dart-rational

What this package is like to depend on

Last release 2 years ago

no release in 18 months

Release timing varies

gaps range from 2 weeks to 1.5 years

Most releases are documented

notes for 29 of 38 stable releases

Nothing withdrawn

no release was ever pulled

13 years old

39 releases · first in 2013

0 releases in the last 12 months

see the full history below

Release timeline

39 releases · Apr 2013 to Jun 2024
2014 2016 2018 2020 2022 2024 2026
Release Pre-release

Releases

latest 39
  1. 2.2.3 02 Jun 2024
    Release notes
    Open source →
  2. 2.2.2 07 Dec 2022
    Release notes
    • Update files according to license.
    Open source →
  3. 2.2.1 24 Nov 2022
    Release notes
    • Update license file to be recognized by pub.dev.
    Open source →
  4. 2.2.0 20 Mar 2022
    Release notes
    • Explicitly throw an ArgumentError when a Rational is created with a zero denominator.
    Open source →
  5. 2.1.0 27 Jan 2022
    Release notes
    • Add Rational.tryParse.
    Open source →
  6. 2.0.0 29 Nov 2021
    Release notes

    The goal of this version is to move several decimal methods back to the decimal package and to have sharper types on the API.

    It introduces several breaking changes.

    • ~/, round(), floor(), ceil(), truncate() now return a BigInt. If you need a Rational you can convert the BigInt to Rational with bigint.toRational().
    • Removal of toDecimalString(). You can replace it with rational.toDecimal(scaleOnInfinitePrecision: 10).toString() using the decimal package.
    • Removal of isNaN getter. It was always returning false.
    • Removal of isInfinite getter. It was always returning false.
    • Removal of isNegative getter. You can replace it with rational < Rational.zero.
    • Removal of roundToDouble(), floorToDouble(), ceilToDouble(), truncateToDouble(). You can replace them by round().toDouble(), floor().toDouble(), ceil().toDouble(), truncate().toDouble().
    • Removal of toInt(). You can replace it with rational.toBigInt().toInt().
    • Removal of hasFinitePrecision getter. This getter (provided as extension on Rational) is now part of the decimal package.
    • Removal of precision and scale getters. They was only available on rational returning true on hasFinitePrecision (ie. decimal numbers). You can replace them with rational.toDecimal().precision and rational.toDecimal().scale using the decimal package.
    • Removal of toStringAsFixed, toStringAsExponential and toStringAsPrecision. You can replace them with rational.toDecimal(scaleOnInfinitePrecision: xxx).toStringAsFixed,rational.toDecimal(scaleOnInfinitePrecision: xxx).toStringAsExponential and rational.toDecimal(scaleOnInfinitePrecision: xxx).toStringAsPrecision using the decimal package.

    Other changes:

    • Add extension method toRational() on int.
    • Add extension method toRational() on BigInt.
    Open source →
  7. 1.2.1 28 May 2021
    Release notes
    Open source →
  8. 1.2.0 28 May 2021
    Release notes
    • Improve parsing of number with big exponent part. However the exponent part must now be parsable as an int.
    Open source →
  9. 1.1.0 29 Apr 2021
    Release notes
    • Allow negative value as exponent of pow.
    Open source →
  10. 1.1.0+1 29 Apr 2021
    Release notes
    • Fix the doc of pow.
    Open source →
  11. 1.0.0 25 Feb 2021
    Release notes
    • Stable null safety release.
    Open source →
  12. 1.0.0-nullsafety 27 Nov 2020 pre-release
    Release notes
    • Migrate to nullsafety.
    Open source →
  13. 0.3.8 30 Jan 2020
    Release notes
    • Improve pub score.
    Open source →
  14. 0.3.7 21 Dec 2019
    Release notes Open source →
  15. 0.3.6 03 Sep 2019
    Release notes
    • add Rational.pow.
    Open source →
  16. 0.3.5 29 Jul 2019
    Release notes
    • add Rational.zero and Rational.one.
    • add Rational.inverse.
    Open source →
  17. 0.3.4 25 Apr 2019
    Release notes Open source →
  18. 0.3.3 08 Apr 2019
    Release notes Open source →
  19. 0.3.2 19 Mar 2019
    Release notes Open source →
  20. 0.3.1 24 Jul 2018
    Release notes
    • migration to Dart 2.
    Open source →
  21. 0.3.0 10 Jul 2018
    Release notes
    • allow parsing of 1..
    • make Rational.parse a factory constructor.
    Open source →
  22. 0.2.0 15 Mar 2018
    Release notes
    • move to Dart SDK 2.0
    • remove BigInt class
    • use BigInt provided by dart:core
    Open source →
  23. 0.1.11 16 Jun 2017
    Release notes
    • add types.
    Open source →
  24. 0.1.10 19 Feb 2017
    Release notes Open source →
  25. 0.1.10+1 19 Feb 2017
    Release notes Open source →
  26. 0.1.9 10 Jun 2016
    Release notes Open source →
  27. 0.1.8 29 Oct 2014
    Release notes
    • fix bugs with dart2js
    • add Rational.signum
    • add Rational.hasFinitePrecision
    • add Rational.precision
    • add Rational.scale
    Open source →
  28. 0.1.8+1 29 Oct 2014
    Release notes
    • fix a bug for Rational.precision on negative number.
    Open source →
  29. 0.1.7 07 Oct 2014
    Release notes
    • Rational.parse accepts strings in scientific notation (eg. 1.5e-3).
    Open source →
  30. 0.1.6 06 Oct 2014
    Release notes
    • BigInt.parse accepts an optional prepending + for positive integers.
    Open source →
  31. 0.1.5 25 Jul 2014

    Nothing published for this version

  32. 0.1.4 11 Mar 2014

    Nothing published for this version

  33. 0.1.3 28 Nov 2013

    Nothing published for this version

  34. 0.1.2 22 Nov 2013

    Nothing published for this version

  35. 0.1.1 21 Nov 2013

    Nothing published for this version

  36. 0.1.0 20 Nov 2013

    Nothing published for this version

  37. 0.0.6 09 Nov 2013

    Nothing published for this version

  38. 0.0.5 17 Apr 2013

    Nothing published for this version

  39. 0.0.4 16 Apr 2013

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive