private void markError(final String var) {
        final VariableState state = Objects.requireNonNull(get(var));
        if (state.state == State.CYCLE) {
            return;
        }
        state.result = null;
        state.resultAsCharSequence = null;
        recalculateSingle(state, true);
        for (String n : state.isNeededBy) {
            markError(n);
        }
    }
Calculates a set of all variables which are needed (directly or indirectly) to calculate the given vars
main/src/main/java/cgeo/geocaching/utils/formulas/VariableMap.java