The US uses math to maximise partisan outcomes, when US Republicans have the chance to set boundaries they use software and consultants to crack Democrat districts and maximise chances for Republican county wins (and, of course, vice versa).
Countries such as Australia also use math to lay out districts, however they don't put the fozes in charge of the henhouse and instead have independant groups proposing new maps on the basis of party neutral constraints, take submissions and challenges onboard and operate in a transparent manner.
No system is perfect and naturally Australia at various times and in various locales has had "gerymandering" complaints and scandals - but nothing on the order of the US skews .. even after normalising for population scales.