PackageTrack
Sign in Get early access

decimal

The decimal package allows you to deal with decimal numbers without losing precision.

3.2.6 736K downloads/mo #422 most downloaded on pub.dev a14n/dart-decimal

What this package is like to depend on

Last release 26 days ago

28 Jul 2026

Release timing varies

gaps range from 2 weeks to 13 months

Most releases are documented

notes for 35 of 43 stable releases

Nothing withdrawn

no release was ever pulled

14 years old

44 releases · first in 2013

2 releases in the last 12 months

see the full history below

Release timeline

44 releases · Jan 2013 to Jul 2026
2014 2016 2018 2020 2022 2024 2026
Release Pre-release

Releases

latest 44
  1. 3.2.6 28 Jul 2026
    Release notes Open source →
  2. 3.2.5 17 Jul 2026
    Release notes
    • Fix toStringAsPrecision emitting an extra digit on power-of-10 carry
    Open source →
  3. 3.2.4 22 Jun 2025
    Release notes
    • Fix issue with scale of zero causing problem in addition/substraction with zero.
    Open source →
  4. 3.2.3 19 Jun 2025
    Release notes
    Open source →
  5. 3.2.2 15 Jun 2025
    Release notes Open source →
  6. 3.2.1 20 Jan 2025
    Release notes Open source →
  7. 3.2.0 19 Jan 2025
    Release notes
    • Improve performances
    Open source →
  8. 3.1.0 22 Nov 2024
    Release notes
    • Bump intl to 0.20.0, lints to 5.0.0
    • Bump SDK to 3.3.0 (enables wasm)
    Open source →
  9. 3.0.2 09 Jun 2024
    Release notes
    • Fix #107: avoid exception when formatting decimal with NumberFormat.compact().
    Open source →
  10. 3.0.1 04 Jun 2024
    Release notes
    • Throw FormatException on formatter.parse('NaN').
    Open source →
  11. 3.0.0 02 Jun 2024
    Release notes
    • Add DecimalFormatter to deal with intl package. Your can now parse and format decimals.
    • Add a dependency to intl.
    Open source →
  12. 2.3.3 08 Jul 2023
    Release notes Open source →
  13. 2.3.2 07 Dec 2022
    Release notes
    • Update files according to license.
    Open source →
  14. 2.3.1 24 Nov 2022
    Release notes
    • Update license file to be recognized by pub.dev.
    Open source →
  15. 2.3.0 07 Sep 2022
    Release notes
    • (Breaking change) Fix Decimal.pow return type. This method now returns a Rational because 3.pow(-1) (similar to 1/3) could not be represented as a Decimal.
    • Allow Rational.toDecimal() customization via its new toBigInt parameter.
    Open source →
  16. 2.2.0 19 Apr 2022
    Release notes Open source →
  17. 2.1.0 22 Dec 2021
    Release notes
    Open source →
  18. 2.0.1 20 Dec 2021
    Release notes Open source →
  19. 2.0.0 29 Nov 2021
    Release notes

    The goal of this version is to have sharper types on the API and to avoid having [Decimal] objects that are not decimal numbers (1/3 for instance).

    It introduces several breaking changes.

    • ~/ now returns a BigInt. If you need a Decimal you can convert the BigInt to Decimal with bigint.toDecimal().
    • 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 decimal < Decimal.zero.
    • inverse, / now return a Rational. If you need a Decimal you can convert the Rational to Decimal with rational.toDecimal(scaleOnInfinitePrecision: xxx). If you need to make several computations where inverses or divisions are involved you should make thoses operations on Rational type to avoid loosing precision and at the end convert the result back to Decimal if you want to display the result in a decimal form.

    Other changes:

    • round(), floor(), ceil(), truncate() now accept an optional scale to indicate at which digit the operation should be done.
    • Add shift to move the decimal point.
    • Add extension method hasFinitePrecision on Rational to know if a decimal form of the rational is possible without loosing precision.
    • Add extension method toDecimal() on Rational.
    • Add extension method toDecimal() on int.
    • Add extension method toDecimal() on BigInt.
    Open source →
  20. 1.5.0 17 Nov 2021
    Release notes
    • Support json serialization as String with Decimal.fromJson/Decimal.toJson.
    Open source →
  21. 1.4.0 16 Nov 2021
    Release notes
    • Add Decimal.ten.
    • Add Decimal.toBigInt.
    Open source →
  22. 1.3.0 21 Jul 2021
    Release notes
    • Add Decimal.fromBigInt.
    Open source →
  23. 1.2.0 31 May 2021
    Release notes
    • Add DecimalIntl to allow formatting with intl package.
    Open source →
  24. 1.1.0 29 Apr 2021
    Release notes
    • Allow negative value as exponent of pow.
    Open source →
  25. 1.0.0 25 Feb 2021
    Release notes
    • Stable null safety release.
    Open source →
  26. 1.0.0+1 29 Mar 2021
    Release notes
    • Fix typo in the description of the package.
    Open source →
  27. 1.0.0-nullsafety 27 Nov 2020 pre-release
    Release notes
    • Migrate to nullsafety.
    Open source →
  28. 0.3.5 03 Sep 2019
    Release notes Open source →
  29. 0.3.4 29 Jul 2019
    Release notes
    • add Decimal.zero and Decimal.one.
    • add Decimal.inverse.
    Open source →
  30. 0.3.3 16 Jan 2019
    Release notes
    • add Decimal.tryParse.
    Open source →
  31. 0.3.2 24 Jul 2018
    Release notes
    • migration to Dart 2.
    Open source →
  32. 0.3.1 10 Jul 2018
    Release notes
    • make Decimal.parse a factory constructor.
    Open source →
  33. 0.3.0 10 Jul 2018
    Release notes
    • allow parsing of 1.
    Open source →
  34. 0.2.0 15 Apr 2018
    Release notes
    • move to Dart SDK 2.0
    Open source →
  35. 0.1.4 16 Jun 2017
    Release notes
    • make package strong clean
    Open source →
  36. 0.1.3 29 Oct 2014
    Release notes
    • add Decimal.signum
    • add Decimal.hasFinitePrecision
    • add Decimal.precision
    • add Decimal.scale
    Open source →
  37. 0.1.2 25 Jul 2014

    Nothing published for this version

  38. 0.1.1 28 Nov 2013

    Nothing published for this version

  39. 0.1.0 20 Nov 2013

    Nothing published for this version

  40. 0.0.5 09 Nov 2013

    Nothing published for this version

  41. 0.0.4 17 Apr 2013

    Nothing published for this version

  42. 0.0.3 23 Jan 2013

    Nothing published for this version

  43. 0.0.2 22 Jan 2013

    Nothing published for this version

  44. 0.0.1 20 Jan 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