dotnet / dotnet-api-docs

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

Highlight special implementation in remarks #10090

Open halmaia opened 1 week ago

halmaia commented 1 week ago

The .NET’s DegreesToRadians uses a special implementation ((degrees Pi) / 180.0) which result could deviate from the widespread 0.017453292519943295 degrees’ version (especially in the case of extremely small numbers). For example converting 1.2345678912345678e-40° to radians in Python™ returns 2.154727454144645e-42. In .NET the result is 2.1547274541446447E-42. The difference is not big at all but could break tests. Why did the .NET team choose this implementation?

dotnet-issue-labeler[bot] commented 1 week ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

dotnet-issue-labeler[bot] commented 1 week ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.