coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

seq: add support for parsing hexadecimal floating point inputs

Open jfinkels opened this issue 4 years ago • 2 comments

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

jfinkels avatar Sep 12 '21 03:09 jfinkels

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.

stale[bot] avatar Jan 13 '23 12:01 stale[bot]

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!

Qelxiros avatar May 25 '24 07:05 Qelxiros