I would trade maths knowledge for actual magic every single time. Maths basically was invented because of money & land, and that’s basically irrelevant with magic. Don’t need acres of land if you can have multiple wildlife reservations inside of a suitcase.
It’s honestly one of the best things about Harry Potter series: it leaves as much muggle crap out of it as possible.