Hello,
I could provide some answers regarding the programming part. Programming languages like C & C# have built in "Math" libraries/packages that you can import in your code and use them immediately. Especially C# makes use of the Microsoft .NET framework that has a lot of things prebuilt.
You can easily grasp the basic concept by doing a Google search with the keywords i mentioned (Math/package/C# etc) and also have a look at the links provided below:
C#:
https://msdn.microsoft.com/en-us/library/system.math(v=vs.110).aspx
https://stackoverflow.com/questions/1557507/what-is-a-good-statistical-math-package-for-net
https://stackoverflow.com/questions/5888366/math-operations-using-system-decimal-in-c
C:
http://www.tutorialspoint.com/c_standard_library/math_h.htm
https://en.wikipedia.org/wiki/C_mathematical_functions