[Mono-list] Math precision.

Miguel de Icaza miguel@ximian.com
19 Jul 2001 19:24:22 -0400


> I've been working on the System.Math class, trying to implement
> everything in C# without useing P/Invoke. I've been fairly successfull
> at implementing the trig functions like sin/cos, but I've so far not
> been able to get the precission of the results more precise then 15
> decimals. What would everyone prefer I do. Will 15 decimal precision be
> good enough until I can find a way to do it better, or should I just
> give up and P/Invoke the C sin/cos function?

I suggest strongly that you use PInvoke to call the C sin/cos
functions, because those will actually be implemented in terms of the
floating point unit (come to think of it, I might even add support to
the JIT and the interpreter to automatically turn those invocations
into native calls)

Miguel.