Numbers
Numbers copied to clipboard
Trigonometric functions for EDecimal
Includes sin, cos, tan, asin, acos, atan, atan2.
Also including sinh, cosh, tanh should be easy.
Here is a starting point: https://github.com/raminrahimzada/CSharp-Helper-Classes/blob/master/Math/DecimalMath/DecimalMath.cs
Also doing them for EFloat is okay but we only use EDecimal so it is more important to us.
There are also a couple of tests that can be ported directly: https://github.com/raminrahimzada/CSharp-Helper-Classes/blob/master/Math/DecimalMath/DecimalMathUnitTests.cs
The reason why it is not implemented might be because it is hard to implement trigonometric functions with correct rounding and because there are very few resources and implementations on correctly rounded trigonometric algorithms.
The only publicly-available implementation with correct rounding that I have found is MPFR. Here is a document of their proofs: https://www.mpfr.org/algorithms.pdf