Use doubles internally for speedup