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: numerical precision issue causing difference from GNU output #7186

Open
jfinkels opened this issue Jan 20, 2025 · 2 comments
Open

seq: numerical precision issue causing difference from GNU output #7186

jfinkels opened this issue Jan 20, 2025 · 2 comments
Labels

Comments

@jfinkels
Copy link
Collaborator

This was found by the fuzzer in this job https://github.com/uutils/coreutils/actions/runs/12875524963/job/35897027858?pr=7181#step:7:4790. The logs for this test case started with

Running test ["seq", "18.499885215552325", "-0.0918587338370287", "-5068"]
Test Type: seq
Input: ["18.499885215552325", "-0.0918587338370287", "-5068"]
Rust stdout: 18.4998852155523250
# very long output...

You can narrow the test case down a bit to just

$ seq 18.499885215552325 -0.0918587338370287 -1006.7 |tail

Here is the diff between the output of GNU seq and that of uutils seq:

--- gnu	2025-01-20 16:20:55.686430468 -0500
+++ uutils	2025-01-20 16:20:58.638351255 -0500
@@ -2,9 +2,9 @@
 -1005.9087145349917374
 -1006.0005732688287661
 -1006.0924320026657948
--1006.1842907365028236
--1006.2761494703398523
--1006.3680082041768810
--1006.4598669380139097
+-1006.1842907365028235
+-1006.2761494703398522
+-1006.3680082041768809
+-1006.4598669380139096
 -1006.5517256718509383
 -1006.6435844056879670

There is a very small difference between some of the numbers due to some numerical precision issue. (The difference is in the last digit.)

@jfinkels
Copy link
Collaborator Author

Duplicate of #5759 maybe?

@drinkcat
Copy link
Contributor

Yeah, looks the same. And again, output of uutils is the same as coreutils on arm64...

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

No branches or pull requests

2 participants