Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add workaround for double.infinity #14

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

wolfgio
Copy link

@wolfgio wolfgio commented Jan 8, 2025

This pull request introduces support for handling infinity values in the BigDecimal class and includes several code simplifications and formatting improvements.

Support for Infinity Values:

  • Added BigDecimalInfinity class to handle infinity values (lib/src/big_decimal_infinity.dart).
  • Updated BigDecimal class to include a factory constructor for infinity values and modified the parse method to return BigDecimalInfinity when appropriate (lib/src/big_decimal.dart). [1] [2]

Code Simplifications:

  • Removed the private constructor _ from BigDecimal and replaced all instances with the public constructor (lib/src/big_decimal.dart). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Formatting Improvements:

  • Reformatted code in BigDecimal class for better readability (lib/src/big_decimal.dart). [1] [2] [3]
  • Reformatted test cases for better readability (test/big_decimal_test.dart). [1] [2] [3] [4] [5] [6] [7] [8]

Test Updates:

  • Added test cases to verify the correct handling of infinity values (test/big_decimal_test.dart).

Dependency Updates:

  • Updated exports and imports to include the new big_decimal_infinity.dart file (lib/big_decimal.dart, lib/src/big_decimal.dart, test/big_decimal_test.dart). [1] [2] [3]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant