od
: Add support for -t fL
(long double, 80-bit on x86)
#8426
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3096, and part of of GNU's
tests/od/od-float
.Some TODOs, for follow-up PR (I'll do some of it and file issues for the rest):
f128
(IEEE 754-2008 binary128), and maybe fall back tof64
on arm.prn_float.rs
should also useuucore
's formatting functions (that code is quite old), that'd make the printing a bit "better", i.e. just print1
vs1.000000
. => that'll fixtests/od/od-float
I think.test_od: Add f128 test (actually a f80 test)
od: Add printer for ExtendedBigDecimal (for f80/f128)
od: input_decoder: f80 parsing code for -t fL format
This replicates x86(-64) behaviour.
od: output_info: Add support for 16 byte long output
fL can consume 16 bytes at a time, so we need to be able to
generate correct padding.
Also add a simple test for such wider lines.
od: Start adding support for f128 (ExtendedBigDecimal-backed)
There is no (stable) support for f128 (yet?), and we need to parse
f80 anyway, so let's back the datatype with an ExtendedBigDecimal,
for now.
uucore: extendedbigdecimal: Add from_number_exp2 to compute num * 2**exp
Move the code from num_parser, as we have another usecase in od.