Use extraprec context manager

Instead of try/finally blocks.