Skip to content

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

Open
williballenthin wants to merge 1 commit intogchq:masterfrom
williballenthin:fix-2240
Open

fix: From Base operation produces wrong results for fractional inputs#2285
williballenthin wants to merge 1 commit intogchq:masterfrom
williballenthin:fix-2240

Conversation

@williballenthin
Copy link
Copy Markdown

@williballenthin williballenthin commented Mar 24, 2026

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>
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