forked from shopspring/decimal
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Sync upstream #3
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since trailing 0 digits after the decimal point are trimmed, intString becomes an empty string when there is no digit before the decimal point and all digits after the decimal point is 0, causing big.Int SetString to fail because there is no string to parse. Fix shopspring#134.
call Coefficient on uninitialized Decimal will panic
decimal: add decomposer interface
fix: Coefficient panic
Fix decoding of .0
This reverts commit 75bb2cb.
Add NewFromInt and NewFromInt32
…pspring#160) * Remove unnecessary decimal rescaling * Move benchmarks to separate file, add new benchmark tests
* remove 15 interval RoundCash * update function doc * Remove comments and benchmark referring interval 15 Co-authored-by: Mateusz Woś <wos.mateusz16@gmail.com>
* revert original remove insignificant change (PR 46), and add the logic back as a function
* Drop support for Go versions older than 1.7 * Update README.md
* Add new helper methods: BigInt, BigFloat * Add few tests cases showing loss of precision after casting
* Improve go report cards score
…g#173) * Update documentation, clean up package level documentation
* fix: fix rounding in FormatFloat fallback path
…pring#184) * Implement new initialization function - NewFromFormattedString * Redefine docstring
* Implement RoundUp and RoundDown methods
* optimize NewFromString a bit * add benchmark for large number Co-authored-by: Nicholas Nordeen <nnordeen@fanatics.com>
…#340) * Update Github Actions libraries to the latest working version * Update badge to show status from master branch only
Co-authored-by: Chris Belsole <chris.belsole@homelight.com>
Given the interface definition type Ordered[T any] interface { Compare(T) int } And the type constraint T Ordered[T], make decimal.Decimal satisfy this constraint, so that generic code written against T Ordered[T] can work with decimal values as smoothly as it works with time.Time values today. Fixes: shopspring#345
* Adjust Ln method to prevent infinity iteration loops * Add test case for infinity loop
* Adjust Pow implementation * Add PowWithPrecision method * Add PowInt32 method * Add PowBigInt method
* Drop support for Go versions older than 1.10 * Remove 1.18 from test suite
nmwari
approved these changes
Jun 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
no comment