-
Notifications
You must be signed in to change notification settings - Fork 183
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
Implement SignedFixedDecimal
and UnsignedFixedDecimal
#5667
Merged
Merged
Changes from all commits
Commits
Show all changes
133 commits
Select commit
Hold shift + click to select a range
b5517cb
First step into implementing the sign fixed decimal
younies c557cc0
implement SignedDecimal
younies 89ee37f
Move important functions
younies 8194482
Fix most unsinged int issues
younies 1ec4607
Merge remote-tracking branch 'upstream/main' into add-sign-fixeddecimal
younies 9c52868
Merge remote-tracking branch 'upstream/main' into add-sign-fixeddecimal
younies f3a4e1e
fix fmt
younies 0819754
Add from_no_sign
younies b292bc7
Refactor module imports in fixed_decimal crate
younies 797a27e
Refactor module imports and add rounding module
younies 3488f02
Merge remote-tracking branch 'upstream/main' into add-sign-fixeddecimal
younies efaeb0b
Merge remote-tracking branch 'upstream/main' into add-sign-fixeddecimal
younies d0378db
Merge remote-tracking branch 'upstream/main' into add-sign-fixeddecimal
younies 69f9a96
Refactor decimal module and rounding logic
younies 69a4602
Refactor decimal module and rounding logic
younies 0170adf
Refactor decimal module and rounding logic: Make internal expansion a…
younies eeb6c0b
Refactor decimal module and rounding logic: Improve handling of sign …
younies b17592e
fix the write to
younies f98341e
Import the needed test cases and functions
younies 6f4bfa1
fix FrixedInteger
younies 6f6c68e
fix decimal.rs
younies 55a8074
fix fixed integer
younies 0f3b6e8
copy rounding to signed_rounding
younies 401a9fd
fix signed_rounding
younies 6cd257b
fix rounding.rs
younies 87734ef
small fixes
younies 522969f
fix the formatter of fixed decimal
younies 2dab6ae
Fix compact decimal
younies 6b2f7cf
update permyriad.rs
younies 2900aa4
add signed_fixed_decimal benchmark
younies f2a1d4a
Fix from f64
younies 94ed10f
fix plurals
younies 3c47291
fix datetime.rs
younies c7e0867
Refactor CompactDecimalFormatter to use SignedFixedDecimal instead of…
younies 25af730
Refactor CompactDecimalFormatter to use SignedFixedDecimal instead of…
younies b5eb957
Refactor CompactDecimalFormatter to use SignedFixedDecimal instead of…
younies c862d66
Refactor CompactDecimalFormatter to use SignedFixedDecimal instead of…
younies 126eb14
Refactor CompactDecimalFormatter to use SignedFixedDecimal instead of…
younies 6eed793
Merge remote-tracking branch 'upstream/main' into add-sign-fixeddecimal
younies ca17e08
Refactor variable name in Signed struct
younies 853b39b
Refactor variable name in Signed struct
younies 62d40a8
Refactor FFI fixed decimal
younies b4ad9f4
Fix other places
younies b94836c
Refactor PluralOperands creation to use SignedFixedDecimal instead of…
younies a9fe703
Refactor variations.rs: Remove unused structs WithCompactExponent and…
younies 86ec2b0
Refactor variations.rs: comment unused structs WithCompactExponent an…
younies 9b8bb6e
Refactor variations.rs: move FloatPrecision
younies b69db8b
Refactor decimal.rs : fix types
younies 6d75608
Refactor variations.rs: comment unused structs WithCompactExponent an…
younies 8d2300e
Refactor compact.rs: Update struct name to SignedFixedDecimal
younies b8c65fb
Use `DeRef` and `DeRefMut`
younies 25b6944
remove
younies 18f9cdf
Refactor signed_decimal.rs: Remove unused methods and add TODOs
younies 9e8f306
Merge remote-tracking branch 'upstream/main' into add-sign-fixeddecimal
younies a458474
Merge remote-tracking branch 'upstream/main' into add-sign-fixeddecimal
younies 286e071
Refactor signed to delete multipy pow10 and rounding tests to use mul…
younies 5ddfb1f
Refactor rounding modes to introduce SignedRoundingMode and UnsignedR…
younies 4d404e2
Refactor signed decimal to use the new roundings
younies 6de5ad7
Refactor rounding benchmarks to use new SignedRoundingMode and Unsign…
younies 058a6ba
Merge remote-tracking branch 'upstream/main' into add-sign-fixeddecimal
younies 65c96d2
Refactor rounding tests to use UnsignedRoundingMode enums
younies c8467ee
Refactor fixed_decimal example to use mutable variable for multiplica…
younies 2d34dd3
Refactor format_fixed_decimal to use mutable variable for significand…
younies 473df73
Refactor test_grouper to use mutable variable for SignedFixedDecimal …
younies f0af932
Remove unused half_ceil_to_increment_internal method from UnsignedFix…
younies df26d31
Remove unused half_floor_to_increment_internal method from UnsignedFi…
younies b863dea
Refactor SignedFixedDecimal multiplication to use mutable variable
younies c593589
Add separate rounding modes for unsigned and signed fixed decimals
younies dd16268
Merge remote-tracking branch 'upstream/main' into add-sign-fixeddecimal
younies 89b6913
Merge branch 'main' into add-sign-fixeddecimal
younies 047e075
Update examples in UnsignedFixedDecimal to use u32 literals for clarity
younies f4c99f1
Update documentation examples in CompactDecimal to use SignedFixedDec…
younies d495f1b
Remove floor and floored methods from UnsignedFixedDecimal and their …
younies 37f832f
Remove floor_to_increment_internal method from UnsignedFixedDecimal
younies 1a06ffa
Remove ceil and ceiled methods from UnsignedFixedDecimal and their as…
younies 558087b
Remove outdated examples from UnsignedFixedDecimal documentation
younies 3ed6989
Remove unused ceil_to_increment_internal method from UnsignedFixedDec…
younies 5a3e800
Remove outdated rounding examples from UnsignedFixedDecimal documenta…
younies 37658c8
Update UnsignedFixedDecimal documentation examples for clarity and re…
younies 901934d
Refactor UnsignedFixedDecimal documentation: update examples for clar…
younies 391807d
Update documentation for FixedDecimal: clarify API usage and examples…
younies 5427740
Update examples in SignedRoundingMode documentation to use SignedFixe…
younies 66f3dd6
Update documentation examples in SignedFixedDecimal to use SignedFixe…
younies 34daff2
Refactor ScientificDecimal to use SignedFixedDecimal instead of Unsig…
younies 840f41f
Update UnsignedFixedDecimal documentation to reflect error handling f…
younies 09fc8d8
Update documentation and examples to use SignedFixedDecimal instead o…
younies ccfcfa7
Update documentation to use SignedFixedDecimal instead of FixedDecimal
younies 1565d37
Remove test cases for negative inputs in UnsignedFixedDecimal tests
younies e808318
Merge branch 'main' into add-sign-fixeddecimal
younies 89ab41b
Fix documentation to use SignedFixedDecimal instead of FixedDecimal i…
younies b717350
Update documentation to replace FixedDecimal with SignedFixedDecimal …
younies aefe9f4
Update documentation to clarify formatting requirements for FixedDeci…
younies 9ad972d
Fix Diplomat: Refactor FixedDecimal to SignedFixedDecimal and update …
younies a40bd1f
Merge remote-tracking branch 'upstream/main' into add-sign-fixeddecimal
younies b8678e6
Refactor datetime formatting to use SignedFixedDecimal
younies 8d05ac2
Refactor time zone formatting to use SignedFixedDecimal
younies 922d8c0
Refactor rounding tests to remove negative cases and adjust expected …
younies 9e512ee
Refactor imports in decimal modules to streamline dependencies
younies 62f7a79
fix fmt
younies eafd3e6
Refactor duration formatting to eliminate unnecessary cloning and fix…
younies ee39ebe
Refactor imports in decimal modules to consolidate dependencies
younies 0b09f57
Remove unused feature flag for ryu in fixed_decimal module
younies f2ce7ef
Update documentation to reference UnsignedFixedDecimal and SignedFixe…
younies 5f522c6
Update documentation to reference UnsignedFixedDecimal in SignedFixed…
younies 43199ae
Refactor rounding mode definitions: remove unused files and introduce…
younies 459a608
fix fmt
younies c68e117
Merge remote-tracking branch 'upstream/main' into add-sign-fixeddecimal
younies 989224e
Introduce a constructor for SignedFixedDecimal and refactor its usage…
younies 6661a58
cargo make diplomat-coverage
younies ac916bd
Merge remote-tracking branch 'upstream/main' into add-sign-fixeddecimal
younies d98a628
Update references from FixedDecimal to SignedFixedDecimal and add mis…
younies 630ee22
Replace FixedDecimal with SignedFixedDecimal in tests and format func…
younies 2156d7f
Replace FixedDecimal with SignedFixedDecimal in fixeddecimal.cpp
younies 772c685
Replace FixedDecimal with SignedFixedDecimal in JS and TypeScript tut…
younies 5217ac0
Update documentation to replace FixedDecimal with SignedFixedDecimal …
younies 226616e
Replace FixedDecimal with SignedFixedDecimal in ICU test
younies 9d4b32f
Replace FixedDecimal with SignedFixedDecimal in JS tiny loader
younies c11070c
Replace SignedFixedDecimalFormatter references with FixedDecimalForma…
younies 24dbcb4
Refactor benchmarks to use SignedFixedDecimal instead of UnsignedFixe…
younies b9a202d
Update documentation for rounding modes to clarify signed and unsigne…
younies a696144
Refactor documentation for SignedFixedDecimal to enhance clarity and …
younies def35eb
Merge remote-tracking branch 'upstream/main' into add-sign-fixeddecimal
younies accee4a
Replace FixedDecimal with SignedFixedDecimal in various components
younies 236de88
Refactor format function signature for improved readability
younies e38f7b6
Update documentation to reflect change from FixedDecimal to SignedFix…
younies 9b56fa5
Add missing API entries for SignedFixedDecimal and UnsignedFixedDecim…
younies a50c928
Clarify error handling for sign characters in UnsignedFixedDecimal input
younies 87dfd16
Add test cases for syntax errors in decimal input strings
younies 2dd420f
Remove leading plus sign from test case input strings and clean up un…
younies 98e0518
Merge remote-tracking branch 'upstream/main' into add-sign-fixeddecimal
younies ff7706c
Update dependencies and versions in Cargo.lock
younies 8b96a00
Merge remote-tracking branch 'upstream/main' into add-sign-fixeddecimal
younies 792707a
fix merge
younies File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue: Why did you change
padded_start
topad_start
?However, you'll need the
{ ... }
block anyway if SignedFixedDecimal doesn't duplicate the functions of the inner type. Maybe we can just duplicate the-ed
functions.We discussed the
-ed
functions in June: #2902 (comment)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because
padded_start
returnsUnsignedFixedDecimal
, however,pad_start
changes theUnsignedFixedDecimal
inside theUnsignedFixedDecimal
.