Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

printf_("%#.0llo", 0) produces "", should produce "0" #114

Open
eyalroz opened this issue Jul 31, 2021 · 0 comments
Open

printf_("%#.0llo", 0) produces "", should produce "0" #114

eyalroz opened this issue Jul 31, 2021 · 0 comments

Comments

@eyalroz
Copy link

eyalroz commented Jul 31, 2021

This is similar to bug #109 , but with long long arguments (and an ll specifier).

If we call printf_("%#.0llo", 0), we get an empty string ("") instead of getting "0" like we should with the alternative format for octal.

eyalroz referenced this issue in eyalroz/printf Jul 31, 2021
* Added a couple of test cases for exposing the behavior of the `#` modifier (alternative mode) together with `ll` (long long modifier), and specifically exposing the example format string mentioned in bug #114.
* Our fix for #109 was too eager to keep `FLAG_HASH` - it dropped it only when a precision wasn't specified. We're now going part of the way back - dropping `FLAG_HASH` even when precision wasn't specific - except for octal.
* The `long long` version of ntoa now behaves just like the `long` version.
eyalroz referenced this issue in eyalroz/printf Jul 31, 2021
* Added a couple of test cases for exposing the behavior of the `#` modifier (alternative mode) together with `ll` (long long modifier), and specifically exposing the example format string mentioned in bug #114.
* Our fix for #109 was too eager to keep `FLAG_HASH` - it dropped it only when a precision wasn't specified. We're now going part of the way back - dropping `FLAG_HASH` even when precision wasn't specific - except for octal.
* The `long long` version of ntoa now behaves just like the `long` version.
eyalroz referenced this issue in eyalroz/printf Aug 3, 2021
* Added a couple of test cases for exposing the behavior of the `#` modifier (alternative mode) together with `ll` (long long modifier), and specifically exposing the example format string mentioned in bug #114.
* Our fix for #109 was too eager to keep `FLAG_HASH` - it dropped it only when a precision wasn't specified. We're now going part of the way back - dropping `FLAG_HASH` even when precision wasn't specific - except for octal.
* The `long long` version of ntoa now behaves just like the `long` version.
KarlK90 pushed a commit to qmk/printf that referenced this issue Jul 7, 2022
…trema of the representation range.

* Special-casing the power-of-10 function for 10^-308.
* Altered `get_normalized_components()` to not strive for better precision for near-extremal powers (at both ends) and settle for the "rougher" way to obtain the integral and decimal parts.
* Added a test-case of a near-extremal-power which fails due to the re-normalization even if the powering is correct.
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

No branches or pull requests

1 participant