Replaced commons-math3 with uncommons-maths library. Resolves #1871