Post Reply 
CAS/Home buggy
12-05-2018, 11:09 PM
Post: #1
CAS/Home buggy
#pragma mode( separator(.,Wink integer(h32) )
EXPORT zlines(ybuss)
BEGIN
local lnedata,linedat,ttalbuses,zp;
local a,b,c,d,q,M11;
ttalbuses:= SIZE(mat2list(col(ybuss,1)));
a:=col(ybuss,1);
lnedata:=transpose(ybuss);
linedat:=sum(lnedata);
b:=length(linedat);
return ({ttalbuses,a,lnedata,linedat,b});
END;

Home run;
zlines([[0.166666666667,−0.166666666667,0],[−0.166666666667,0.277777777778,−0.111111111111],[0,−0.111111111111,0.311111111111]])
correct answer={3,[0.166666666667,−0.166666666667,0],[[0.166666666667,−0.166666666667,0],[−0.166666666667,0.277777777778,−0.111111111111],[0,−0.111111111111,0.311111111111]],[0,0,0.2],3}

CAS run;
zlines([[0.166666666667,−0.166666666667,0],[−0.166666666667,0.277777777778,−0.111111111111],[0,−0.111111111111,0.311111111111]])
buggy answer={50,'tran',tran(ybuss),"prodsum Error: Bad Argument Value",1} ??
Find all posts by this user
Quote this message in a reply
12-06-2018, 02:31 AM
Post: #2
RE: CAS/Home buggy
(12-05-2018 11:09 PM)toshk Wrote:  #pragma mode( separator(.,Wink integer(h32) )

Your semi-colon followed by a right parenthesis looks like a winking smiley face when rendered by this forum!

; ) Wink

Tom L
I think therefore I am-Descartes
I think therefore you are-Gorgias
You're not here to think-Army Sergeant
Find all posts by this user
Quote this message in a reply
12-06-2018, 08:43 AM
Post: #3
RE: CAS/Home buggy
Place the lot in "code" tags and that should solve the problem:

Code:
#pragma mode( separator(., ;, integer(h32) )
EXPORT zlines(ybuss)
BEGIN
local lnedata,linedat,ttalbuses,zp;
local a,b,c,d,q,M11;
ttalbuses:= SIZE(mat2list(col(ybuss,1)));
a:=col(ybuss,1);
lnedata:=transpose(ybuss);
linedat:=sum(lnedata);
b:=length(linedat);
return ({ttalbuses,a,lnedata,linedat,b});
END;
Find all posts by this user
Quote this message in a reply
Post Reply 




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