Use double instead of long to avoid ambiguous error