[Mono-list] Math precision.

Michael Meeks michael@ximian.com
Thu, 19 Jul 2001 14:25:19 -0400 (EDT)


Hi Bob,

On 19 Jul 2001, Bob Smith wrote:
> > 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,

	Your implementation, although interesting is never going to be as
quick as the native versions of these functions built into modern
processors. A 'sin' is a handful of cycles and can be interleaved with
other floating point ops [ ok so not via PInvoke it can't :-], it would be
hundreds of times more efficient to just invoke the C routine which should
go to the co-proc.

	Regards,

		Michael.

-- 
 mmeeks@gnu.org  <><, Pseudo Engineer, itinerant idiot