Use double for improved numerical precision