I am considering tree possible solutions.
- Implementing this algorithm withing a python function.
- Using the GNU Scientific Library (GSL) from within a SAGE program. More specifically this GSL function.
- Using R from SAGE with the fBasic R package.
Best Regards.