Just use the // operator for integer division instead and you won't be limited by then size of floats. Can even get rid ot the explicit int() conversions.
(newX*(newX+2)+E)//2
Alternatively since you're always dividing by two, its much faster to just shift right by one bit than performing an actual division
(newX*(newX+2)+E)>>1