math: add single precision error handling functions