Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

factor: add -h/--exponents option #4682

Closed
tdulcet opened this issue Mar 29, 2023 · 0 comments · Fixed by #4710
Closed

factor: add -h/--exponents option #4682

tdulcet opened this issue Mar 29, 2023 · 0 comments · Fixed by #4710
Labels

Comments

@tdulcet
Copy link

tdulcet commented Mar 29, 2023

GNU coreutils 9.2 added a new -h/--exponents option to the factor command (source):

  factor now accepts the --exponents (-h) option to print factors
  in the form p^e, rather than repeating the prime p, e times.

The change was made in this commit: coreutils/coreutils@f45ab30. (For an additional reference implementation, I also added support for this to my Numbers Tool, which wraps the factor command: tdulcet/Numbers-Tool@1b897cf.)

Example with GNU factor:

$ ./factor -h 3000
3000: 2^3 3 5^3

This is not supported by uutils' factor. Fixing this along with #1559 should make all the GNU tests for factor pass.

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

Successfully merging a pull request may close this issue.

2 participants