-
-
Notifications
You must be signed in to change notification settings - Fork 616
Description
I was going through the test262 conformance results and noticed that
Math.f16round is failing the value-conversion.js test.
After digging into it, I found that Math.f16round(1.00048828125000022204)
returns 1 instead of the correct value 1.0009765625.
The problem seems to be in how the float16 crate converts from f64 to f16
internally — it goes through f32 first, which causes double rounding and
produces the wrong result for certain inputs.
The fix would be to use the half crate's f16::from_f64 which is already
in the dependency tree and does the conversion correctly without going
through f32.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels