Scott Dattalo wrote: > > On Mon, 13 Nov 2000, M. Adam Davis wrote: > > > y = ( 1 + x ) / ( 1 - x ) > > > > simplifies to > > > > y= 2 / (1-x) - 1 > > or > > y= ( -2 / (x-1) ) - 1 > > I think you meant: > > y = 1 + 2x /(1-x) > > Right? Well, no: y = ( 1 + x ) / ( 1 - x ) Seperate the numerator into two fractions: y = 1/(1-x) + x/(1-x) Expand using partial fractions: y = 1/(1-x) + 1/(1-x) - 1 Simplified: y = 2/(1-x) - 1 This can be simplifed further, knowing that 0 < x < 1, and shouldn't be too difficult to calculate more quickly than a full 24-bit division routine. -Adam -- http://www.piclist.com hint: PICList Posts must start with ONE topic: "[PIC]:","[SX]:","[AVR]:" =uP ONLY! "[EE]:","[OT]:" =Other "[BUY]:","[AD]:" =Ads