scala maths API