Use proper 64-bit integer arithmetic for Hz calculation