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

Fixed IntegerFormatStyle for values > Int64.max. #262

Merged
merged 52 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
84b6e5a
Fixed IntegerFormatStyle for values > Int64.max.
wadetregaskis Sep 16, 2023
1ded056
Removed the reliance on `BinaryInteger.description` for `IntegerForma…
wadetregaskis Sep 26, 2023
fed358b
Merge branch 'apple:main' into main
wadetregaskis Sep 26, 2023
778a6d0
Merge branch 'apple:main' into main
wadetregaskis Sep 27, 2023
dac9328
Merge branch 'apple:main' into main
wadetregaskis Sep 29, 2023
cbb3bf2
Use the `.zero` property of `BinaryInteger` than a literal `0` as it …
wadetregaskis Sep 26, 2023
cb4c237
Renamed the helpers from `test` to `check` to avoid any confusion wit…
wadetregaskis Sep 29, 2023
4312195
Renamed the decimalDigitsAndMagnitudePerWord helper to `check` as wel…
wadetregaskis Sep 29, 2023
f72a106
Switched to using UnsafeMutableBufferPointer.initializeElement(at:to)…
wadetregaskis Sep 30, 2023
87c866c
Corrected the calculation for the (maximum) number of wordStrings nee…
wadetregaskis Sep 30, 2023
b78c9db
Handle negative remainders correctly, by ignore the sign bit.
wadetregaskis Sep 30, 2023
9efae3d
Moved the Word == UInt precondition to a location more directly relev…
wadetregaskis Sep 30, 2023
854b010
Added unit tests for numericStringRepresentation and decimalDigitsAnd…
wadetregaskis Sep 30, 2023
b979c25
Optimised the implementation to use just one buffer to build the output.
wadetregaskis Sep 30, 2023
069a6eb
Corrected the `digits` count returned by maximumDecimalDigitsForUnsig…
wadetregaskis Oct 2, 2023
e5ae0e4
Simplified the specialisation of `numericStringRepresentation` re. ex…
wadetregaskis Oct 2, 2023
703a6ee
Added a fast path to `decimalDigitsAndMagnitudePerWord` that computes…
wadetregaskis Oct 2, 2023
342513f
Corrected & refined the wording of various comments.
wadetregaskis Oct 2, 2023
71d661b
Removed outdated precondition check, that Words.Element == UInt.
wadetregaskis Oct 2, 2023
087deac
Added some additional asserts, for rigour.
wadetregaskis Oct 2, 2023
c73c7cc
Removed unnecessary use of Word.max.bitWidth when Word.bitWidth retur…
wadetregaskis Oct 2, 2023
28bb1f5
Replaced UnsafeMutableBufferPoint.Index.advance(by:) with direct arit…
wadetregaskis Oct 2, 2023
e6f0b18
Removed an unnecessary temporary variable ('nextWordInsertPoint').
wadetregaskis Oct 2, 2023
71e8244
Made the `numericStringRepresentation` unit tests work when UInt is 3…
wadetregaskis Oct 2, 2023
0714bfa
Commented out the import of attaswift/BigInt and put the tests that d…
wadetregaskis Oct 4, 2023
45e44e9
Merge remote-tracking branch 'upstream/main'
wadetregaskis Oct 4, 2023
ac4f8f4
Revised the explanatory comment on why `description` cannot be used i…
wadetregaskis Oct 4, 2023
dbae775
Corrected comment about the UInt specialisation of `numericStringRepr…
wadetregaskis Oct 4, 2023
9c45109
Removed errant comma.
wadetregaskis Oct 4, 2023
37d9207
Added rudimentary detection of broken quotientAndRemainder(dividingBy…
wadetregaskis Oct 5, 2023
37932ac
Removed use of `signum()` in favour of just comparing with the value …
wadetregaskis Oct 5, 2023
df74622
Corrected inaccurate wording in the `decimalDigitsAndMagnitudePerWord…
wadetregaskis Oct 5, 2023
371275b
Added some comments in `decimalDigitsAndMagnitudePerWord` delineating…
wadetregaskis Oct 5, 2023
50c16c7
Simplified a variable name, `remainderAsSelf` → `remainder`.
wadetregaskis Oct 5, 2023
1b0e1f5
Updated copyright headers per @glessard's direction (https://github.c…
wadetregaskis Oct 5, 2023
7ef6563
Added explanatory error messages to the asserts.
wadetregaskis Oct 5, 2023
d20025a
Corrected typo in unit test name.
wadetregaskis Oct 5, 2023
72cd8f0
Replaced special-casing of zero in `numericStringRepresentation(intoE…
wadetregaskis Oct 5, 2023
3413e63
Moved some comments from the formal method & property documentation i…
wadetregaskis Oct 5, 2023
9f90a3f
Removed the commented-out additions of attaswift/BigInt as a dependen…
wadetregaskis Oct 6, 2023
b2e2931
Changed the "fast path should handle the zero case" assert to a preco…
wadetregaskis Oct 6, 2023
31c585d
Made `numericStringRepresentation(intoEndOfBuffer:)` fileprivate (fro…
wadetregaskis Oct 6, 2023
9a7854b
Merge remote-tracking branch 'upstream/main'
wadetregaskis Oct 6, 2023
b848a28
Removed trailing commas that were originally absent, before https://g…
wadetregaskis Oct 6, 2023
152c4b8
Merge remote-tracking branch 'upstream/main'
wadetregaskis Oct 8, 2023
426e11e
Added a broken implementation of `actualBitWidth`.
wadetregaskis Oct 9, 2023
4826709
Revert "Replaced special-casing of zero in `numericStringRepresentati…
wadetregaskis Oct 9, 2023
bc2499f
Finally found a solution for determining the minimum bit width of a g…
wadetregaskis Oct 10, 2023
eacacc6
Merge remote-tracking branch 'upstream/main'
wadetregaskis Oct 10, 2023
75bb993
Added tests using the Numberick 3rd party package (if it's available)…
wadetregaskis Oct 10, 2023
efb3f08
Corrected precondition failure message and comment: T ⇄ F.
wadetregaskis Oct 10, 2023
5b9a221
Added a comment on the two's complement of `remainder` noting that wr…
wadetregaskis Oct 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading