Skip to content

fix: From Base operation produces wrong results for fractional inputs#2285

Merged
GCHQDeveloper581 merged 3 commits into
gchq:masterfrom
williballenthin:fix-2240
Jun 20, 2026
Merged

fix: From Base operation produces wrong results for fractional inputs#2285
GCHQDeveloper581 merged 3 commits into
gchq:masterfrom
williballenthin:fix-2240

Conversation

@williballenthin

@williballenthin williballenthin commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

closes #2240

AI disclosure
Claude Code Opus 4.6

The fractional part loop used native `+=` and `Math.pow()` with BigNumber
objects, causing string concatenation instead of arithmetic addition.
Replace with BigNumber `.plus()` and `.pow()` methods.

Closes gchq#2240

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@GCHQDeveloper581 GCHQDeveloper581 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Thank you for your contribution

@GCHQDeveloper581 GCHQDeveloper581 merged commit 0fd6190 into gchq:master Jun 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug report: From Base operation produces NaN for fractional inputs

2 participants