bigmath, factor and prime module now raise specific exception instead of generic Exception.