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

Float hexponent support: "%a" / "%A" #19

Open
charlesnicholson opened this issue Jul 5, 2019 · 1 comment
Open

Float hexponent support: "%a" / "%A" #19

charlesnicholson opened this issue Jul 5, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@charlesnicholson
Copy link
Owner

charlesnicholson commented Jul 5, 2019

Does anyone actually use this? I don't get it.

converts floating-point number to the hexadecimal exponent notation.

For the a conversion style [-]0xh.hhhp±d is used.
For the A conversion style [-]0Xh.hhhP±d is used.
The first hexadecimal digit is not 0 if the argument is a normalized floating point value. 
If the value is ​0​, the exponent is also ​0​. Precision specifies the minimum number of digits 
to appear after the decimal point character. The default precision is sufficient for exact 
representation of the value. In the alternative implementation decimal point character is
 written even if no digits follow it. For infinity and not-a-number conversion style see notes.
@charlesnicholson charlesnicholson added the enhancement New feature or request label Jul 5, 2019
@charlesnicholson
Copy link
Owner Author

charlesnicholson commented Jul 28, 2019

Either way this should do exactly what %e does but just pass base 16 to npf__ftoa_rev or npf__etoa_rev or whatever. npf__ftoa_rev shouldn't take a base if npf__etoa_rev ends up being necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant