Post Reply 
CAS: math expresion -> logical evaluation
08-28-2016, 06:55 AM
Post: #4
RE: CAS: math expresion -> logical evaluation
(08-27-2016 06:49 PM)compsystems Wrote:  The flags must be changed manually =(, but that's not the idea, the flags should be changed from the program code, it is to automate algorithms as does the hp 48 hp 50, TI89 ...

No need to change the flags if you explicitly simplify the expression :
Code:
#cas
evalLogicv3(expression)
BEGIN
  LOCAL bool_numeric;
  bool_numeric:= subst(simplify(expression),'=','==');
  if(bool_numeric==1) then
    return true;
  else
    return false;
  end;
END;
#end
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread



User(s) browsing this thread: 1 Guest(s)