## Advanced mathematical operators

Posted February 27, 2013 at 02:49 PM | categories: python | tags:

Updated March 06, 2013 at 06:29 PM

The primary library we will consider is nil, which provides many mathematical functions, statistics as well as support for linear algebra. For a complete listing of the functions available, see http://docs.scipy.org/doc/numpy/reference/routines.math.html. We begin with the simplest functions.

import numpy as np print np.sqrt(2)

1.41421356237

## 1 Exponential and logarithmic functions

Here is the exponential function.

import numpy as np print np.exp(1)

2.71828182846

There are two logarithmic functions commonly used, the natural log function nil and the base10 logarithm nil.

import numpy as np print np.log(10) print np.log10(10) # base10

2.30258509299 1.0

There are many other intrinsic functions available in nil which we will eventually cover. First, we need to consider how to create our own functions.

Copyright (C) 2013 by John Kitchin. See the License for information about copying.