Someone who derives pleasure or enjoyment from the pain of mathematics.
Anyone who volunteers to take an eight-hour mathematics exam on a Saturday 'for fun' is a bonafide mathochist.