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 f128 code paths #6630

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

jalil-salame
Copy link
Contributor

  • refactors uumain

  • adds regression test for seq 4e4000003 4e4000003 is causing an infinite loop #6182 (commented out until implementation is done)

  • preliminary implementation of the f128 code path (feature gated)

    I'm having issues with libquadmath.so.0: it loads fine when I run the binary directly (target/debug/coreutils seq ...), but fails when I run the tests (cargo test/cargo nextest run). It might be a weird NixOS issue though.

I'll try using the nightly f128 code tomorrow to verify the tests pass.

Clean up the code in uumain, making it more readable and easier to modify to use f128s.
Add a positive (accepts `f128`) and a negative (rejects non `f128`) test.
@jalil-salame jalil-salame marked this pull request as draft August 10, 2024 22:37
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

feature gated because it requires libquadmath
@jalil-salame
Copy link
Contributor Author

The main features this needs to work on nightly are impl FromStr for f128 and impl Display for f128.

I tried implementing them by converting to/from BigDecimal, but that is a lot of code (hard to maintain) and I don't think I even did it correctly as a bunch of tests are failing.

I'll keep this as a draft and keep an eye on the f128 stabilization process; whenever FromStr and Display are stabilized I'll give it another try.

If anyone in the future wants to give this a shot, then check the following links:

@sylvestre
Copy link
Contributor

@jalil-salame it is still marked as draft, are you still working on it? thanks

@jalil-salame
Copy link
Contributor Author

The main features this needs to work on nightly are impl FromStr for f128 and impl Display for f128.

I tried implementing them by converting to/from BigDecimal, but that is a lot of code (hard to maintain) and I don't think I even did it correctly as a bunch of tests are failing.

I'll keep this as a draft and keep an eye on the f128 stabilization process; whenever FromStr and Display are stabilized I'll give it another try.

If anyone in the future wants to give this a shot, then check the following links:

It is blocked by these issues, I left it open so that contributors could see this before starting an attempt, if you feel it should be closed/reattempted, feel free to do so

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

Successfully merging this pull request may close these issues.

2 participants