Added double versions of calc.py and calc.m