diff options
| author | Trevor Gross <tmgross@umich.edu> | 2025-02-06 00:02:00 +0000 |
|---|---|---|
| committer | Trevor Gross <t.gross35@gmail.com> | 2025-02-05 18:30:30 -0600 |
| commit | 3fbe59f8503fb5eb151bc995ba2c1ebad80dcbb5 (patch) | |
| tree | cabbc018927430cb5e8647e00b2d18baa5305a9d /tests/codegen | |
| parent | e01ce5d53a929019a8c9655c7dee4c74a911d465 (diff) | |
| download | rust-3fbe59f8503fb5eb151bc995ba2c1ebad80dcbb5.tar.gz rust-3fbe59f8503fb5eb151bc995ba2c1ebad80dcbb5.zip | |
Print the hex float format upon failure
Now that we have a hex float formatter, make use of it for test output.
This produces values that are easier to read than the bitwise hex
representation.
Example:
thread 'mp_quickspace_fmaf128' panicked at crates/libm-test/tests/multiprecision.rs:17:48:
called `Result::unwrap()` on an `Err` value:
input: (0xe38d71c71c71c71c71c71c71c71c71c8, 0xe38d71c71c71c71c71c71c71c71c71c8, 0xffff0000000000000000000000000000)
as hex: (-0x1.71c71c71c71c71c71c71c71c71c8p+9102, -0x1.71c71c71c71c71c71c71c71c71c8p+9102, -inf)
as bits: (0xe38d71c71c71c71c71c71c71c71c71c8, 0xe38d71c71c71c71c71c71c71c71c71c8, 0xffff0000000000000000000000000000)
expected: 0xffff0000000000000000000000000000 -inf 0xffff0000000000000000000000000000
actual: 0x7fff8000000000000000000000000000 NaN 0x7fff8000000000000000000000000000
Caused by:
real value != NaN
Diffstat (limited to 'tests/codegen')
0 files changed, 0 insertions, 0 deletions
