try using long instead of double.