Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: Adding option to print full precision fp (#3381)
`mlir-opt` attempts to print floats as 6dp scientific notation, but round-trips to ensure there is no precision loss and the printed number will bitwise reproduce exactly. If this fails, it will choose a different printing method to ensure bit-reproducible printing for a given precision of fp types. This PR takes the approach of mlir-opt: attempt to print to scientific 6dp notation iff the resulting string is losslessly reproducible, or else print to full precision using repr. This has the advantage of not affecting a vast number of filechecks, mirroring upstream, and not having a flag for either full or reduced precision. --------- Co-authored-by: n-io <[email protected]>
- Loading branch information