Open Happypig375 opened 7 years ago
In some cases, inequalities can be written as equations using the sign function. x>0
could be written as sqrt(x^2)/x = 1
.
@jarble, thanks for the input. Definitely something to consider. Does x<0
then become -sqrt(x)/x = 1
? This might be a silly question since I just skimmed the article but would be a rewrite for x>=0
? Do you break it up into two equations at this point?
x<0
could be also be written as sqrt(x^2)/x = -1
. sqrt(x^2)/x
is undefined when x = 0
, so x >= 0
would need to be written in another way.
It seems that x != 0
could be written as abs(x)/abs(x) = 1
, since this expression is undefined when x=0
.
Currently the solve functions (solve, solveFor, solveEquations) only accept equations. I propose redefining the existing comparison operators to creating inequalities and letting the solve functions solce them.