-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android][x86] System.Runtime.InteropServices.Tests.NFloatTests failed #65557
Comments
Tagging subscribers to 'arch-android': @steveisok, @akoeplinger Issue DetailsThere are the following failures in the
cc @steveisok @akoeplinger @tannergooding @vargaz
|
Float tests should not compare using exact equality, they should use the |
@vargaz, no. IEEE 754 floating-point is deterministic and there are plenty of cases where using exact equality is warranted and correct. In this case, these are all testing single simple operations and that These represent concrete and real bugs in mono and need to be fixed. |
That is, these represent issues where the code executing for the given architecture is not IEEE 754 compliant and is likely due to the JIT/AOT performing invalid optimizations or other changes to the code. |
mono on x86 is still using the old fp stack based fp instructions which operate with a different precision, that might be the cause of these problems. |
In particular, the test is doing: [Theory]
[InlineData(-4567.0f, 3.14f)]
[InlineData(-4567.89101f, 3.14569f)]
[InlineData(0.0f, 3.14f)]
[InlineData(4567.0f, -3.14f)]
[InlineData(4567.89101f, -3.14569f)]
public static void op_Subtraction(float left, float right)
{
NFloat result = new NFloat(left) - new NFloat(right);
if (Environment.Is64BitProcess)
{
Assert.Equal((double)left - right, result.Value);
}
else
{
Assert.Equal(left - right, result.Value);
}
} where [NonVersionable]
public static NFloat operator -(NFloat left, NFloat right) => new NFloat(left._value - right._value); and where:
The inputs in question here are
We could "fix" this in the tests by inserting an explicit cast to |
Will try to transition the x86 backend to SSE, will take some time. In the meantime, these tests should be disabled on mono+x86. |
Yeah, they are going to be disabled in #65551 |
There are the following failures in the
System.Runtime.InteropServices.Tests.NFloatTests
library test suite which are being hit on Android x86 leg in #65551:https://dev.azure.com/dnceng/public/_build/results?buildId=1620509&view=ms.vss-test-web.build-test-results-tab&runId=45058618&paneView=debug&resultId=166936
cc @steveisok @akoeplinger @tannergooding @vargaz
The text was updated successfully, but these errors were encountered: