Skip to content

Conversation

@giordano
Copy link
Member

The return value of the LLVM instruction fptosi (https://llvm.org/docs/LangRef.html#fptosi-to-instruction) does not guarantee that the truncation of NaN is 0, so we relax the test to only check that the output has the expected type.

Fix #56582.

The return value of the LLVM instruction
`fptosi` (https://llvm.org/docs/LangRef.html#fptosi-to-instruction) does not
guarantee that the truncation of `NaN` is 0, so we relax the test to only check
that the output has the expected type.
@giordano giordano added float16 test This change adds or pertains to unit tests labels Nov 21, 2024
@Keno Keno merged commit 1fb8df6 into JuliaLang:master Nov 21, 2024
9 checks passed
@Keno
Copy link
Member

Keno commented Nov 21, 2024

This does raise the point that unsafe_trunc is not :consistent, but I guess we'll just throw that in the larger bucket of floating point effect model issues.

@giordano giordano deleted the mg/unsafe-trunc-float16 branch November 21, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

float16 test This change adds or pertains to unit tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Erroneous test in julia/test /float16.jl?

2 participants