Skip to content

Fix the whole part of vulgar fractions - #110

Merged
borgar merged 1 commit into
borgar:masterfrom
jayhemnani9910:fix/fraction-whole-part
Nov 10, 2026
Merged

borgar merged 1 commit into
borgar:masterfrom
jayhemnani9910:fix/fraction-whole-part

Conversation

@jayhemnani9910

Copy link
Copy Markdown
Contributor

The whole part of a fraction format was rounded to one decimal before flooring, so format('# ??/16', 2.96) gave 3 15/16, which reads as 3.94. The fraction also didn't carry: format('# ?/2', 1.75) gave 1 2/2.

The whole part is now floored from the value, and a fraction that rounds to 1 carries into it: 2 15/16 and 2, same as Excel. Two new assertions fail without the change. vitest run with the Excel tables passes (53082 tests).

The whole part was rounded to one decimal before flooring, so 2.96 in
# ??/16 printed as 3 15/16. A fraction rounding up to 1 now carries.
@borgar
borgar merged commit 63255c1 into borgar:master Nov 10, 2026
3 checks passed
@jayhemnani9910
jayhemnani9910 deleted the fix/fraction-whole-part branch November 13, 2026 14:25
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.

2 participants