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

seq: add support for parsing hexadecimal floating point inputs #2660

Open
jfinkels opened this issue Sep 12, 2021 · 2 comments
Open

seq: add support for parsing hexadecimal floating point inputs #2660

jfinkels opened this issue Sep 12, 2021 · 2 comments
Labels

Comments

@jfinkels
Copy link
Collaborator

See https://www.gnu.org/software/coreutils/manual/html_node/Floating-point.html#Floating-point

For example,

$ seq -0x.ep-3 -0x.1p-3 -0x.fp-3
-0.109375
-0.117188
@stale
Copy link

stale bot commented Jan 13, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@Qelxiros
Copy link
Contributor

Hello! I started digging into this, and it looks like BigDecimal has some shortcomings. I'd like to use the BigDecimal::from_str_radix() function to parse input (either before or after splitting on p), but that function only allows a radix of 10. I considered some sort of hack to work around this, but at that point I'm just reimplementing what bigdecimal should do. I'm going to look into making a PR to bigdecimal, but failing that/in the meantime, I'd appreciate some guidance here. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

4 participants