Use deterministic algorithm, for repeatable tests