Fix edge cases in format F and N with precision 0 and 1 #3231
Fix edge cases in format F and N with precision 0 and 1 #3231josesimoes merged 3 commits intonanoframework:mainfrom
Conversation
- Reworked the rounding logic to use the actual rounding digit (pend) and propagate carry correctly from the last significant digit leftwards. - Properly handles ripple (e.g., 9.8999 -> 10) and updates decpt/ndigits when needed in FF_FCVT mode.
WalkthroughUpdates adjust floating-point rounding and precision handling in nanoprintf and add negative-zero trimming in System.Number native formatting. Rounding now uses the extra digit at Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related issues
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
Motivation and Context
How Has This Been Tested?
Screenshots
Types of changes
Checklist
Summary by CodeRabbit