Double Precision Math port

Needs to be tested with double math examples.