Consider the following:
restart;
abs(x)/x;
                                          |x|
                                          ---
                                           x 
simplify( (1) );
                                          |x|
                                          ---
                                           x 
simplify( (1) ) assuming x>0;  # OK
                                           1
simplify( (1) ) assuming x=0;  # OK
                                           0
simplify( (1) ) assuming x>=0; # Uh-oh
                                           1
It would seem to me that the last result should have been abs(x)/x - no simplification is possible in this case. The second result is fine. I know about _Envsignum0. This, too, leads to some more odd results.
_Envsignum0 := 0;
                                      0
simplify( (1) );
                                     |x|
                                     ---
                                      x 
simplify( (1) ) assuming x>0;  # OK
                                      1
simplify( (1) ) assuming x=0;  # OK
                                      0
simplify( (1) ) assuming x>=0; # OK
                                     |x|
                                     ---
                                      x 
and
_Envsignum0 := undefined;
                                  undefined
simplify( (1) );
                                     |x|
                                     ---
                                      x 
simplify( (1) ) assuming x>0;  # OK
                                      1
simplify( (1) ) assuming x=0;  # Say what?
                                     -1
simplify( (1) ) assuming x>=0; # OK
                                     |x|
                                     ---
                                      x 
These results are very troubling for me as I try to write procedures to carefully determine if a student-entered interval is correct (open, closed, half-open, ...). Can anyone explain how this is a feature and not a bug? Doug

Please Wait...