Add a stop condition based on a internal state, also round double values when using the rhino script engine