I need to apply a trigonometric function (cosine) to a number and get the result accurate to around 25 significant figures. I know a decimal allows 28sf but the cos function built into C# apparently takes in a double and returns a double. So is there a way to make it return a decimal, precise to more significant figures.
Asked
Active
Viewed 59 times
2
-
You can try numerical methods, but other than that, I don't know. – Sweeper Mar 10 '19 at 10:18
-
@Sweeper By that, do you mean create my own cosine function instead of using the built-in one? – Dan Leb Mar 10 '19 at 10:19
-
There's something in https://stackoverflow.com/questions/3249710/accuracy-of-math-sin-and-math-cos-in-c-sharp , Using big integer might be overkill for 25 significant digits. – user202729 Mar 10 '19 at 10:20