Base class for all math exceptions.
This class is abstract to ensure that only fine-grained exceptions are thrown throughout the code.