Determined value near where the large double stops working (in CPP implementation). Python implementation still not working for unknown reasons