dotnet / dotnet/dotnet-api-docs
Math.PI values are inconsistent
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
[Documentation](https://docs.microsoft.com/en-us/dotnet/api/system.math.pi?redirectedfrom=MSDN&view=netcore-2.2) says at the top:
```public const double PI = 3.14159265358979;```
In the [remarks](https://docs.microsoft.com/en-us/dotnet/api/system.math.pi?redirectedfrom=MSDN&view=netcore-2.2#remarks)
> The value of this field is 3.1415926535897931.
While in the [source](https://source.dot.net/#System.Private.CoreLib/shared/System/Math.cs,a4407e67b9a5afad) it is really this value:
```public const double PI = 3.14159265358979323846;```
And just too add more to it:
```
> Console.WriteLine(((Math.PI - 3.14159265358979)) > Double.Epsilon)
True
> Console.WriteLine(((Math.PI - 3.141592653589793)) > Double.Epsilon)
False
```
Contributor guide
Assessment
This issue has not been assessed yet.