Post Reply 
[SOLVED] Given (|) in programming?
05-29-2016, 08:24 AM
Post: #2
RE: Given (|) in programming?
I'm not sure that syntax, using the "|" operator, is valid within a program; but using assume() and additionally() does appear to work. See modified program below:

Code:
EXPORT XINT1(expression,domainlow,domainhigh)
BEGIN
 LOCAL equation;
 LOCAL variable;
 LOCAL answer;
 variable:="x>"+string(domainlow);
 CAS.assume(EVAL(variable));
 variable:="x<"+string(domainhigh); 
 CAS.additionally(EVAL(variable));
// variable:="x";
 equation:=EXPR(LOWER(STRING("0="+expression)));//EXPR means convert to a string.
 answer:=CAS.solve(EVAL(equation),"x");
 print("X-INTERCEPT(S)");
 print(answer);
 RETURN "DONE";
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Given (|) in programming? - roadrunner - 05-29-2016 08:24 AM
RE: Given (|) in programming? - CH3791 - 05-29-2016, 08:47 AM



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