Skip to content

Conversation

@logiclrd
Copy link
Contributor

Added a unit test for issue #319 highlighting the issues with the new Decimal() implementation for very large ranges.
Added code to Randomizer.Decimal to detect these situations and compensate for them, keeping as many digits of precision as possible.

…l_with_very_large_range_succeeds to Bogus.Tests.

Updated Randomizer.Decimal to make the test pass.
…ate methods GenerateRandomMaximumPrecisionDecimal and ScaleMaximumPrecisionDecimalToRange.

Added unit tests to RandomizerTest.cs.
Tweaked the implementation of GenerateRandomMaximumPrecisionDecimal and ScaleMaximumPrecisionDecimalToRange based on observations driven by the tests.
@bchavez bchavez force-pushed the master branch 14 times, most recently from 0b65acc to cc799df Compare December 22, 2023 19:04
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.

2 participants