| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
fractional(-1.3) returned '-1 -3/10' instead of '-1 3/10', and fractional(-2.5) returned '-2 -1/2'. The whole-number part already carries the sign (int(-1.3) == -1), so the numerator should not repeat it. This was inconsistent with the pure-fraction case, which is already correct (fractional(-0.3) == '-3/10'). Use abs(numerator) in the mixed-fraction output. Add regression cases (-0.3, -1.3, -2.5) to the parametrized test_fractional, which previously had no negative inputs.
| Back | FazBrowse Home | New Git URL |
Changes proposed in this pull request:
No existing issue.