Given that I have an conditional expression like: a > 9, do you know if a library exists, which can negate the condition correctly to: a <= 9. ?
The problem: I have a constraint solver, lp_solve, which I feed with constraints, i.e. conditions. Then it calculates a solution for me, i.e. a number satisfying the constraints. But sometimes I need a number that does not satisfy the constraints. That's the reason why I need a library that can negate conditional expressions.
BTW. lp_solve only supports the following relational operators: "<" "<=" "=" ">" ">=". Which unfortunately excludes the ! or NOT, which would have been a nice feature in my case.
EDIT: Another approach on solving this could be first calculating the maximum solution, i.e. the maximum number satisfying the constraints, and then the minimum, hence choose a number not included in the interval [min , max]. Is this better than logical negation?.
Best regards, Kaj.