Post Reply 
Output of propositional functions
01-14-2017, 12:49 PM
Post: #5
RE: Output of propositional functions
(01-13-2017 12:06 PM)roadrunner Wrote:  I don't know of a switch, but this function returns true and false in CAS:

g2(x):=BEGIN IF x>0 THEN RETURN(true); END ; RETURN(false); END;

In HOME I think you will always get 0 or 1.

-road

I agree, in HOME should return 1/0 but in CAS MODE always TRUE / FALSE as constants without evaluating.

CASs must show SYMBOLIC and non-numerical values

return PI -> π and not 3.14....
return true -> true and not 1
return false -> false and not 0

To see the numerical value, there are the EVAL commands,

EVAL(TRUE) -> 1
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Output of propositional functions - compsystems - 01-14-2017 12:49 PM



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