Badly. It can't do math, to an extent which is honestly surprising given how well it produces code. I suspect that this will improve significantly in the next couple of years, but I kind of hope I am wrong. I am a mathematician by training, and I have my own romanticism.
For example, I tried a bunch of times to get it to give a proof of the infinitude of the primes. This should be repeated many times in its training data, and it clearly is given it's responses, but it always goes off the rails around the third sentence. Here's an example:
> One way to prove that there are infinitely many prime numbers is to use the contradiction method. Assume for the sake of contradiction that there are only finitely many prime numbers, say, p₁, p₂, ..., pₙ. Then we can form a new number N by multiplying all of these prime numbers together and adding 1: N = p₁ * p₂ * ... * pₙ + 1. Because N is greater than any of the prime numbers p₁, p₂, ..., pₙ, it cannot be divisible by any of them. Furthermore, N is not 1, so it cannot be a composite number (i.e., a number that can be written as the product of two smaller numbers). Therefore, N must be a prime number, contradicting the assumption that there are only finitely many prime numbers. This contradiction shows that our assumption must be false, and therefore, there must be infinitely many prime numbers.