Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/src/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ matter the parameters (integers, decimal numbers, positive or negative increment
format specified, etc.), so its output will be more correct than GNU coreutils for
some inputs (e.g. small fractional increments where GNU coreutils uses `long double`).

This also extends the range of values that can be represented beyond GNU coreutils' `long double` maximum.

The only limitation is that the position of the decimal point is stored in a `i64`,
so values smaller than 10**(-2**63) will underflow to 0, and some values larger
than 10**(2**63) may overflow to infinity.
Expand Down
4 changes: 2 additions & 2 deletions src/uu/seq/src/seq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ fn fast_print_seq(
// Format the first number.
let first_str = first.to_string();

// Makeshift log10.ceil
let last_length = last.to_string().len();
// Approximate length of the last number in base 10.
let last_length = (last.bits() as f64 / std::f64::consts::LOG2_10).ceil() as usize;

// Allocate a large u8 buffer, that contains a preformatted string
// of the number followed by the `separator`.
Expand Down
Loading