The patch looks good to me. Without the cast, the computation is done on long arithmetic and the result is extended to unsigned long long. I'll test it and release a new package if it's fine. Thanks a lot for the debugging and the patch! -- Etienne Millon