added numerical precision for exp (was causing unstable gradients with in precise results returning -1 for exp values, this fixes that by allowing arbitrary precision