Fixes #570: arithmatic with long int
Note that numbers larger than 10^308 will not cast to doubles