use Double for computation, not Float