update maths library. Refs #242