Skip to content
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

[release/8.0] Numerics and Tensors backport #92245

Merged
merged 9 commits into from
Sep 19, 2023
Prev Previous commit
Microsoft.Bcl.Numerics.Tests: fix restore failure when DotNetBuildFro…
…mSource. (#91402)

* Microsoft.Bcl.Numerics.Tests: fix restore failure when DotNetBuildFromSource.

* Use NetCoreAppCurrent.

* Try fix CI test failures.
  • Loading branch information
tmds authored and michaelgsharp committed Sep 18, 2023
commit 8a95ce524bb3dff9116cf1859254f4987e61ebd1
18 changes: 18 additions & 0 deletions src/libraries/Microsoft.Bcl.Numerics/tests/MathF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,23 @@ public static void Atan2(float y, float x, float expectedResult, float allowedVa
[InlineData(-1.41421356f, -1.0f, 0.0f)] // value: -(sqrt(2))
[InlineData(-1.12837917f, -1.0f, 0.0f)] // value: -(2 / sqrt(pi))
[InlineData(-1.0f, -1.0f, 0.0f)]
#if NETFRAMEWORK
[InlineData(-0.785398163f, 0.0f, 0.0f)] // value: (pi / 4)
[InlineData(-0.707106781f, 0.0f, 0.0f)] // value: (1 / sqrt(2))
[InlineData(-0.693147181f, 0.0f, 0.0f)] // value: (ln(2))
[InlineData(-0.636619772f, 0.0f, 0.0f)] // value: (2 / pi)
[InlineData(-0.434294482f, 0.0f, 0.0f)] // value: (log10(e))
[InlineData(-0.318309886f, 0.0f, 0.0f)] // value: (1 / pi)
[InlineData(-0.0f, -0.0f, 0.0f)]
#else
[InlineData(-0.785398163f, -0.0f, 0.0f)] // value: (pi / 4)
[InlineData(-0.707106781f, -0.0f, 0.0f)] // value: (1 / sqrt(2))
[InlineData(-0.693147181f, -0.0f, 0.0f)] // value: (ln(2))
[InlineData(-0.636619772f, -0.0f, 0.0f)] // value: (2 / pi)
[InlineData(-0.434294482f, -0.0f, 0.0f)] // value: (log10(e))
[InlineData(-0.318309886f, -0.0f, 0.0f)] // value: (1 / pi)
[InlineData(-0.0f, -0.0f, 0.0f)]
#endif
[InlineData(float.NaN, float.NaN, 0.0f)]
[InlineData(0.0f, 0.0f, 0.0f)]
[InlineData(0.318309886f, 1.0f, 0.0f)] // value: (1 / pi)
Expand Down Expand Up @@ -614,7 +624,11 @@ public static void Log10(float value, float expectedResult, float allowedVarianc
[InlineData(float.NaN, float.PositiveInfinity, float.NaN)]
[InlineData(float.NaN, float.NegativeInfinity, float.NaN)]
[InlineData(-0.0f, 0.0f, 0.0f)]
#if NETFRAMEWORK
[InlineData(0.0f, -0.0f, -0.0f)]
#else
[InlineData(0.0f, -0.0f, 0.0f)]
#endif
[InlineData(2.0f, -3.0f, 2.0f)]
[InlineData(-3.0f, 2.0f, 2.0f)]
[InlineData(3.0f, -2.0f, 3.0f)]
Expand All @@ -636,7 +650,11 @@ public static void Max(float x, float y, float expectedResult)
[InlineData(float.NegativeInfinity, float.NaN, float.NaN)]
[InlineData(float.NaN, float.PositiveInfinity, float.NaN)]
[InlineData(float.NaN, float.NegativeInfinity, float.NaN)]
#if NETFRAMEWORK
[InlineData(-0.0f, 0.0f, 0.0f)]
#else
[InlineData(-0.0f, 0.0f, -0.0f)]
#endif
[InlineData(0.0f, -0.0f, -0.0f)]
[InlineData(2.0f, -3.0f, -3.0f)]
[InlineData(-3.0f, 2.0f, -3.0f)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(NetFrameworkMinimum)</TargetFramework>
<TargetFrameworks>$(NetFrameworkMinimum);$(NetCoreAppCurrent)</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down