Looks excellent. Thanks, Mark! Sean On Thu, Jan 14, 2010 at 8:11 PM, Mark Rages wrote: > Hi everybody, > > I've recently needed a fixed-point atan2() function for my day job. > > I looked around and didn't find anything ready-to-go for a 16-bit > microcontroller. > > So I wrote a script to generate this function using a CORDIC > algorithm. =A0I put it online at http://vivara.net/cgi-bin/cordic.cgi > > The python source is available, but it requires a native C compiler to > run the tests against the generated code. =A0I tried to make the > generated code something that any C compiler could apply optimizations > on. =A0I think it would be straightforward to "hand compile" it to > assembler as well. > > Suggestions and bug reports welcome. > > Regards, > Mark > markrages@gmail > -- > Mark Rages, Engineer > Midwest Telecine LLC > markrages@midwesttelecine.com > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist