Bug/master/18157 arithmetical operations

Add fixes for http://projects.puppetlabs.com/issues/18157