[Bug c/93112] New: Incorrect rounding for float to uint64 on x86 (32bit) with -fexcess-precision=standard

2019-12-31 Thread stefan.bru...@rwth-aachen.de
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: stefan.bru...@rwth-aachen.de Target Milestone: --- The following program yields 1034567 for all 4 cases on x86_64, arm64, armv7, ... and x86 with -fexcess-precision

[Bug target/93112] Incorrect rounding for float to uint64 on x86 (32bit) with -fexcess-precision=standard

2020-01-01 Thread stefan.bru...@rwth-aachen.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93112 --- Comment #2 from Stefan BrĂ¼ns --- I agree the numerical error introduced by truncating/casting is somewhat expected. The strange part is for ~every other architecture, 1.034567 apparently gets rounded up for some immediate value/type (double?