Skip to content

Conversation

@Aras14HD
Copy link
Collaborator

With #295, an off by one error in float formatting was introduced, with the custom float formatter.

This fixes that, by taking the absolute of the number and manually adding the minus.

I should have added more thorough tests in that pull, as a custom formatter is likely to have such bugs, and with that needs proper testing. (Happens, I'll just have to be more careful in the future)

Fixes #305

@tolik518
Copy link
Owner

Thank you for the quick fix :)

As far as I know it's scientifically impossible to test every possible case, even in theory. So this can and will always happen.

@tolik518 tolik518 merged commit c4ba506 into tolik518:master Jan 22, 2026
6 checks passed
@Aras14HD Aras14HD deleted the fix-off-by-one-format-negative-float branch January 22, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parsing of minus decimal factorials is off by one

2 participants