Added support for functions over intervals other than [-1, 1].

Tested it (and wrote tests for) the functions:
* Init
* Add/subtract/multiply/divide
* Differentiate