Here is an 8 bit base 2 logarithm example. http://www.interstice.com/%7esdattalo/technical/software/pic/piclog.html It uses a 16 entries table and linear interpolation. The program can be easily adapted for natural logarithm by changing values in the table. Generally, if you want to find some other base logarithm having only one logarithm routine, use the equation: log x a log x = -------- n log n a The same table-based technique will do the job for 16 bit numbers. The best solution will depend on what accuracy do you need, how fast, and what for. Good luck _ Nikolai Golovchenko, Electrical Engineering Student National Mining University of Ukraine www.nmuu.dp.ua Dnepropetrovsk, Ukraine E-mail: golovchenko@mail.ru -----Original Message----- From: Andy Farrar To: PICLIST@MITVMA.MIT.EDU Date: Thursday, December 09, 1999 6:40 PM Subject: natural logs Hello, I have a problem with knowing where to start, has anybody got example code or the method used in taking the natural log of an 8 bit binary number, and preferably a 16 bit number. Any help would be most appreciated. Many thanks Andrew Farrar