public function coSwitch($a, $b)
    {
        switch (bccomp($a, $b)) {
            case 0:
                // Fall through.
            case -1:
                return array($a, bcmod($b, $a));
            case 1:
                return array($b, bcmod($a, $b));
        }
    }