]> git.ipfire.org Git - thirdparty/coreutils.git/commit
seq: handle exponents more consistently
authorPádraig Brady <P@draigBrady.com>
Tue, 23 Jun 2015 21:51:24 +0000 (22:51 +0100)
committerPádraig Brady <P@draigBrady.com>
Wed, 24 Jun 2015 16:04:01 +0000 (17:04 +0100)
commit32c97093db85c827ccbbf4cd4255190718863232
treec0fc83e1aeb1ef93ae4327d48beb1637177c22a5
parent60c8e31d9201f10295cfdcfd2d15893f9682083b
seq: handle exponents more consistently

src/seq.c (scan_arg): Set precision and width _after_ exponentiation.
For example, this will make '1.1e1 12' and '11 1.2e1' equivalent.
One can still set the precision by specifying extra precision on
the start value, or more naturally with a precision on a step value.
* tests/misc/seq-precision.sh: Add new cases.
src/seq.c
tests/misc/seq-precision.sh