Report Radix as 10, since the type is base 10 - #118
Merged
Merged
Conversation
PreciseNumber stores significand × 10^exponent and does all its digit work in base 10, like decimal, but Radix returned 2. Generic math code that reads T.Radix treated it as binary. Fixes #116 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M4xENzmZT4DZE8d5Hu6kEN
Contributor
Author
|
Analyze & Release failed on Generated by Claude Code |
|
This file contains hidden or 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
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.



Fixes #116
What changed
PreciseNumber.Radixnow returns10instead of2. The constant is renamed fromBinaryRadixtoDecimalRadix.TestRadixnow expects10. It pinned the wrong value before.PreciseNumberstoressignificand × 10^exponentand does all of its digit work in base 10, which is also whatdecimalreports. Generic math code that readsT.Radix, for example to compute ulps or to decide whether scaling is exact, was treating the type as binary.Behaviour change: this changes a public static value, and the commit subject carries that into the generated changelog.
Verification
TestRadixfails with the fix reverted (Assert.AreEqual(10, PreciseNumber.Radix)) and passes with it.dotnet testsuite passes: 385/385.🤖 Generated with Claude Code
https://claude.ai/code/session_01M4xENzmZT4DZE8d5Hu6kEN
Generated by Claude Code