use 64bit arithmetic if possible