Do you want to do this under BSD?
Like in CQuadraticTimeMMD.h?