dotnet / dotnet-api-docs

.NET API reference documentation (.NET 5+, .NET Core, .NET Framework)
https://docs.microsoft.com/dotnet/api/
Other
725 stars 1.56k forks source link

Documention incorrect for edge cases #1890

Open Gtunt opened 5 years ago

Gtunt commented 5 years ago

The method has different return value for edge between .NET Framework and .NET Core For instance : Pow(double.NaN, 0) will return 1 in .Net Core and double.NaN in .NetFramework


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

tannergooding commented 5 years ago

The new behavior is correct and is likely fallout from us moving to a new C Runtime.

IEEE 754 defines that pow(x, +/-0) is 1 if x is not a signaling NaN. .NET doesn't support signalling NaN, so it is 1 for any input.

We ultimately just call into the C Runtime for most of the System.Math functionality and so we will pick up fixes as they implement them.