The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
BUG with AUTOSIMPLIFY() flag
07-29-2018, 06:56 PM (This post was last modified: 07-30-2018 04:23 PM by compsystems.)
Post: #1
BUG with AUTOSIMPLIFY() flag
Hello, the following program with simplify: Maximum must print (x^2-2*x-3) = 0 and not (-2*x-3+x^2) = (2*x+3-2*x-3). The xcas programs are assuming simplify: none.

I think the AUTOSIMPLIFY() xcas command must be incorporated to control the output of the print

Thanks

place manually [shift][cas] simplify: Maximum
PHP Code:
#cas
        
test_simplify_flag():=
    
BEGIN
        
        local  list0
,expr0;
        
local xy;
        
assumexsymbol ); // purge(x);
        
assumeysymbol ); // purge(y);
        
        
autosimplify(2); // nop=none, 1=regroup, 2=simplify
        
print;
        print(
"Solving a system of two equations.  
Solve the  following system  [ y=x², y=2x+3 ]"
);

        
list0 := [ x^22*]; print(list0);

        print(
""); print("> substitute y = x² in y = 2·x + 3");
        
expr0 := subst(list0(2),list0(1)); print(expr0);

        print(
""); print("> substract 2·x + 3");
        
expr0 := expr0-(2*3); print(expr0);
        Return 
"Done";
    
END;
#end 

test_simplify_flag(); print (-2*x-3+x^2) = (2*x+3-2*x-3) and not x^2-2*x-3= 0
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
BUG with AUTOSIMPLIFY() flag - compsystems - 07-29-2018 06:56 PM



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