Care here. Scott only mentioned that the square root takes 3000 odd cycles. He DIDN'T actually confirm anything else that you believed had been heard on the PICLIST about the routines' accuracy etc. I have a pending requirement for something which uses floating point routines and had noted the Microchip ones as a potential source. I'm sure Microchip would be delighted if anyone pointed out problems with their suggested code AND proposed a proper fix. I would be extremely grateful for any such information. Hopefully, part of using such code would involve understanding it and deriving the underlying algorithm, which MAY help spot bugs but that's not always the way things get done :-). So, does anyone have any factual information on the quality of the Microchip floating point routines? (No doubt this is another cyclically asked question - Where did you say the PICLIST FAQ was ? :-) -----Original Message----- From: Morgan Olsson To: PICLIST@MITVMA.MIT.EDU Date: Wednesday, 11 February 1998 08:05 Subject: Re: Floating point app notes >At 08:35 1998-02-10 -0700, you wrote: >>On Mon, 9 Feb 1998, Scott Newell wrote: >> >>> [...] >> >>> In the past I've read on the Piclist that the divide routine is buggy, that >>> the multiply routine doesn't always round correctly, and that the addition >>> and subtraction routines fail under some circumstances (something about >>> large magnitude differences (2^24) and opposite signs). I've also read >>> that the normalize routine doesn't always shift properly, causing rounding >>> and carry errors. >> >> And don't forget that the sqrt routine chews up 3,000 some odd cycles, >> for a poor aproximation, when the exact result can be gotten in less than >> 200 cycles. >> >>> [...] >> >Oh, shit! Is it that bad! >How can we obtain correct libraries, then? > >BTW do the C compilers do correct math, then? > >/Morgan >/ Morgan Olsson, MORGANS REGLERTEKNIK, SE-277 35 KIVIK, Sweden \ >\ mrt@iname.com, ph: +46 (0)414 70741; fax +46 (0)414 70331 / >