--- Michael Marcin wrote:
I hadn't heard of MPL.Math before...
I was actually looking for a way the other day of computing a fixed-point sin lookup table at compile-time using Taylor series approximation for a fixed-point class I have templated on magnitude and fractional bit count. I ended up getting lost and wrote a small program to generate a table and copy & pasted the output into a source file for the fixed-point precision I was using at present.
It seems that it would be nice to be able to generate a new table for say 8.24 fixed-point without needed to rerun an external tool.
#include <iostream>
#include
Does this seem like the sort of thing MPL.Math could help with?
You can look at the sine.cpp example program and see for yourself. As for the sine metafunction implementation, the Taylor series is actually built using a combination of Boost.Preprocessor macros and intermediary typedefs instead of template recursion.
Thanks,
No problem.
Michael Marcin
Cromwell D. Enage ____________________________________________________________________________________ Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. http://tools.search.yahoo.com/toolbar/features/mail/