OPTIONS		--maxdigits=12
4+5								9
4+3*2								10
7/1								7
pi-pi								0
3==1								0
9==(4+5)							1
4<5								1
7>8								0
if pi then 1							1
(if 0 then 1)+1							((null)+1)
(if 3 then 1)+1							2
if 66 then 4 else 5						4
if 0 then 4 else 5						5
a=1								1
a=1;a								1
a=2;a=a+1;a							3
a=1;b=&a;b							(&a)
a=1;b=&a;c=b;c							(&a)
a=1;b=&a;*b							1
a=1;b=&a;a=3;*b							3
a=1;b=&a;c=b;a=3;*c						3
a=1;b=&a;c=b;*c=2;a						2
t=4;if(t>3)then(4)else(3)					4
t=2;if(t>3)then(4)else(3)					3
t=3;if(t>3)then(4)else(3)					3
function t(x) = x+1; t(1)					2
function f(x) = if(x<=1)then 1 else (f(x-1)*x); f(10)		3628800
function f2(x) = (r=x;while(x>1)do(x=x-1;r=r*x);r);f2(10)	3628800
function g(x)=(function r(a)=(a*2); x+r(x)); g(5)		15
g = `(x)=(function r(a)=(a*2); x+r(x)); g(5)			15
function f(a,b,c)=(a+b+c);f(1,2,3)				6
function f(a,b)=(b(a)+1);f(3,`(x)=(x*2))			7
function f(a,b,c)=(b(a)+c(a));f(3,`(x)=(x*2),`(y)=(y+1))	10
t=1;function f(x,y)=(*x=y);f(&t,2);t				2
t=1;function f(x)=(*x=7);f(&t);t				7
t=1;function f(x)=(if(*x>0)then(*x=7)else(*x=8));f(&t);t	7
t=0;function f(x)=(if(*x>0)then(*x=7)else(*x=8));f(&t);t	8
t=0;function f(x)=(if(*x>0)then(*x=7));f(&t);t			0
t=1;a=&t;*a=2;t							2
function f(x)=(x+1);t=&f;*t(2)					3
function f(x,y)=(x+y);t=&f;*t(2,3)				5
function f(x)=(x+1);t=&f;function f(x)=(x*2);*t(2)		4
function f(a)=(*a(2)+1);function t(x)=(x+1);f(&t)		4
function sum(a,b)=a(b)+a(b+1);function blah(x)=x^4;sum(blah,6)	3697
function sum(a,b)=a(b)+a(b+1);sum(`(x)=x^4,6)			3697
(5/0)!								((5/0)!)
5/0								(5/0)
4-7								-3
function t2(a)=(a=a+1;a);t2(2)					3
function t2(a)=(a=a+1;a);t2(2)/2				3/2
4+2/3								14/3
10.1!								(10.1!)
4^(4/3)								6.34960420787
4^2.1								18.37917368
(78+8467i)*(-88754+8784i)					(-81296940-750794966i)
3i+3								(3+3i)
3i*3								(0+9i)
3i/3								(0+1i)
3/3i								(0-1i)
sqrt(-1)							(0+1i)
OPTIONS		--maxdigits=0
50!	30414093201713378043612608166064768844377641568960512000000000000
function t()=(1+2);t						(`()=((1+2)))
function t()=(1+2);t+3						((`()=((1+2)))+3)
function t()=(1+2);a=t+3;a					((`()=((1+2)))+3)
function t()=(1+2);a=t+3;a()					((`()=((1+2)))+3)
function t()=(g=1;g=g+1;g);t()					2
t = `()=(g=1;g=g+1;g);t()					2
function t(x)=(if(x)then(t(x-1))else(0));t(5)+t(4)		0
function t(x)=(function t(x)=(x+1);t(x)+1);t(3)			5
function t(x)=(function t(x,y)=(x+y);t(x,2));t(5)		7
1#4								1
print(5);5+1;.							5
print(5);5+1;							5
.+1								((null)+1)
if(5/0)then(1)							(if (5/0) then 1)
i=5;while((20/i)>1)do(i=i-1)					(while ((20/0)>1) do (i=(i-1)))
t=50;while(t>0)do(t=t-1);t					0
t=50;while(t>1)do(t=t-1);t					1
t=50;b=0;while(t>0)do(t=t-1;b=b+1);b				50
t=0;until(t==50)do(t=t+1);t					50
t=0;do t=t+1 while 0;t						1
t=0;do t=t+1 while t<5;t					5
t=0;do t=t+1 until 1;t						1
t=0;do t=t+1 until t==3;t					3
1;return 3;5							3
function f(x) =(if(x<=0) then return x; return(f(x-1)));f(5)	0
gcd(6813840,5836160)						880
gcd(880*7743,880*6632)						880
gcd(-4,3)							1
gcd(77438,723654)						2
|-5+|-4||							1
|4|								4
a=-74;|a|							74
round(0)							0
round(0.3)							0
round(0.5)							1
round(2.4)							2
round(2.7)							3
round(-3.1)							-3
round(5/4)							1
round(42.0)							42
floor(0)							0
floor(0.3)							0
floor(2.4)							2
floor(-3.1)							-4
floor(5/4)							1
floor(42.0)							42
ceil(0)								0
ceil(0.3)							1
ceil(2.4)							3
ceil(-3.1)							-3
ceil(5/4)							2
ceil(42.0)							42
max(1,2)							2
min(2,1)							1
min(1.3,5/4)							5/4
max(1.3,5/4)							1.3
max(1.3,1.3)							1.3
min(1.3,1.3)							1.3
min(-1.3,1.3)							-1.3
min(3i,5)							(min((0+3i),5))
prod(2,4,`(x)=(x+1))						60
sum(2,4,`(x)=(x+1))						12
a=[1,2:3,4];[a,5:6,7]						[1,2,5:3,4,5:6,6,7]
[1,2]								[1,2]
a=[1:2];[a,3]							[1,3:2,3]
a=[1,2];[a:3,4,5]						[1,2,0:3,4,5]
[1:[2,3]]							[1,1:2,3]
a=[1,2:3,4];a@(1,2)						2
a=[1,2:3,4];a@(2,2)						4
a=[1,2:3,4];a@(2,3)						([1,2:3,4]@(2,3))
[1,2:3,4]@(2,1)							3
is_integer(4)							1
is_integer(3/4)							0
is_rational(3/4)						1
is_rational(3.1)						0
is_rational(3)							0
is_complex(3i)							1
is_complex(3)							0
is_float(3.1)							1
is_float(3)							0
I(4)								[1,0,0,0:0,1,0,0:0,0,1,0:0,0,0,1]
I(0)								(I(0))
lcm(4,6)							12
function f(x)=(if(not is_integer(x)) then bailout else 1);f(1.2)	(f(1.2))
function f(x)=(if(not is_integer(x)) then bailout else 1);f(100)	1
prime(10)							29
exp(3*ln(2))							8
if(0)then 1;0							0
24/2								12
a@(1,2)=3;a							[0,3]
a@(2,2)=3;a							[0,0:0,3]
a@(,2)=[1:2:3];a						[0,1:0,2:0,3]
[1,2:3,4]@(,2)							[2:4]
[1,2:3,4]@(1,)							[1,2]
[1,2:3,4]@(2,)							[3,4]
a=[1,2:3,4];a@(2,)=[5,6];a					[1,2:5,6]
a=[1,2:3,4];a@(2,)=5;a						[1,2:5,5]
a@(1,1)=&d;a							[(&d)]
if(1 and 1) then 1 else 0					1
if(0 and 1) then 1 else 0					0
if("blah" and 1) then 1 else 0					1
if("" and 1) then 1 else 0					0
if("" or 1) then 1 else 0					1
if("" xor 1) then 1 else 0					1
if(1 xor 1) then 1 else 0					0
if(not 1) then 1 else 0						0
if(not "") then 1 else 0					1
"abc"+"def"							"abcdef"
a=3;"abc "+3+" def"						"abc 3 def"
a=[1,2,3:4,5,6];"abc: "+a					"abc: [1,2,3:4,5,6]"
if("AHA"=="AHA") then 1 else 0					1
if("AHA "=="AHA") then 1 else 0					0
not &d								(not (&d))
3i>3i								((0+3i)>(0+3i))
not 3i								(not (0+3i))
if(3=="3")then 1 else 0						1
if(3=="3 ")then 1 else 0					0
is_null(1)							0
is_null(.)							1
[1,2:3,4]+[5,6:7,8]						[6,8:10,12]
["ABC","DEF","GHI"]+["GGG","HHH","III"]				["ABCGGG","DEFHHH","GHIIII"]
[1,2:3,4]*2							[2,4:6,8]
[1,2]*[3:4]							[11]
[1,2:3,4]*[5,6:7,8]						[19,22:43,50]
[1,2]'								[1:2]
[1,2:3,4]'							[1,3:2,4]
1'								(1')
[1,2]*[3,4]'							[11]
addpoly([1,1,2],[0,1])						[1,2,2]
subpoly([1,1,2],[0,1])						[1,0,2]
trimpoly([1,1,0])						[1,1]
trimpoly([0,0,0])						[0]
polytostring([2,-1,2,3],"x")					"3*x^3 + 2*x^2 - x + 2"
polytostring([3,-1,1,-1],"x")					"-x^3 + x^2 - x + 3"
polytostring([0,0,0,1],"x")					"x^3"
is_poly([0,1,2,3])						1
is_poly([0,1,2,3:1])						0
is_poly([0,1,2,&d])						0
polytostring(mulpoly([1,1],[1,1]),"x")				"x^2 + 2*x + 1"
polytostring(mulpoly([-1,1],[1,1]),"x")				"x^2 - 1"
f=polytofunc([3,1,1]);f(2)					9
is_function(`(x)=x+1)						1
is_function(function(x)=x+1)					1
is_function(1)							0
a=`(x)=(x+1);b=&a;is_function_ref(b)				1
is_function_ref(1)						0
i=0;a=0;b=0;while(i<20)do(i=i+1;b=1;continue;a=2);[a,b]		[0,1]
i=0;a=0;b=0;while(i<20)do(i=i+1;b=1;break;a=2);[a,b]		[0,1]
break								(break)
a=0;1 or a=1;a							0
rref(I(5))@(,5)@(5,)@(1,1)					1
trace([1,2,3:4,5,6:7,8,9])					15
ref([0,0,-2,0,7,12:2,4,-10,6,12,28:2,4,-5,6,-5,-1])		[1,2,-5,3,6,14:0,0,1,0,-7/2,-6:0,0,0,0,1,2]
rref([0,0,-2,0,7,12:2,4,-10,6,12,28:2,4,-5,6,-5,-1])		[1,2,0,3,0,7:0,0,1,0,0,1:0,0,0,0,1,2]
ref([1,2,3:0,0,0:0,0,3])					[1,2,3:0,0,1:0,0,0]
-5/-5								1
rref([1,2,3:2,4,6])						[1,2,3:0,0,0]
[2,I(2),3]							[2,1,0,3:2,0,1,3]
[I(2),3:4,5]							[1,0,3:0,1,3:4,4,5]
[[2:3:4],I(2)]							[2,1,0:3,0,1:4,1,0]
a@(1,&f)=1							((a@(1,(&f)))=1)
a=[1,2:3,4];a@(,2)=[1,2]					((a@[,2])=[1,2])
a=[1,2:3,4];a@(,2)=[7,8]';a					[1,7:3,8]
a=[1,2:3,4];a@(2,)=[7:8]';a					[1,2:7,8]
a=[1,2:3,4];a@(2..1,1..2)					([1,2:3,4]@((2..1),(1..2)))
I(3)@(2..3,)							[0,1,0:0,0,1]
a@(2..3,2..3)=[1,2:3,4];a					[0,0,0:0,1,2:0,3,4]
a@(2..3,)=[1,2:3,4];a						[0,0:1,2:3,4]
a@(,2..3)=[1,2:3,4];a						[0,1,2:0,3,4]
a=[1,2,3:4,5,6:7,8,9];[a@(1..1,1..1),a@(1,3):a@(3,1),a@(3,3)]	[1,3:7,9]
a=[1,2,3:4,5,6:7,8,9];a@(1..2,2..3)				[2,3:5,6]
a=[1,2,3:4,5,6:7,8,9];a@(1,1..3)				[1,2,3]
a=[1,2,3:4,5,6:7,8,9];a@(1..3,2)'				[2,5,8]
a=[1,2:3,4];a@(2..3,2)=[5,6]';a					[1,2:3,5:0,6]
a=[1,2:3,4];a@(2..3,2..3)=[5,6:7,8];a				[1,2,0:3,5,6:0,7,8]
b@(4..8,3)=[1,2,3,4]'						((b@((4..8),3))=[1:2:3:4])
b@(2..3,2)=[1,2]';b						[0,0:0,1:0,2]
(i=0;while(i<3) do (i=i+1;))+1					((null)+1)
(i=0;while(i<3) do (i=i+1))+1					4
a=[1,2];set_size(a,2,1)						[1:0]
a=[1,2];set_size(a,2,1);a					[1,2]
a=[1,2,3:4,5,6];a=set_size(a,2,2);a				[1,2:4,5]
a=[1,2,3:4,5,6];a=set_size(a,3,2);a				[1,2:4,5:0,0]
perfect_square(9)						1
perfect_square(8)						0
matsum([3,4:5])							12
matprod([2,3,4])						24
convol_vec([2,3,4],[5,6,7])					[14,18,20]
convol([2,3,4],[5,6,7])						52
matsum(convol_vec([2,3,4],[5,6,7]))				52
prime([1,2,3,4,5,6,7,8,9])					[2,3,5,7,11,13,17,19,23]
min([4,2,6],[2,5,1])						[2,2,1]
max([4,2,&d],[2,5,1])						[4,5,(max((&d),1))]
max([4,2,1],&d)							[(max(4,(&d))),(max(2,(&d))),(max(1,(&d)))]
max(&d,[4,2,1])							[(max((&d),4)),(max((&d),2)),(max((&d),1))]
log([1000,9],[10,3])						[3,2]
log10([100,1000])						[2,3]
is_matrix(log([1,1000,9],[10,3]))				0
log([27,9],3)							[3,2]
sqrt(-9)							(0+3i)
cos(3*pi)							-1
cos(2*pi)							1
cos(pi)								-1
for i = 1 to 3 do i						3
print(for i = 4 to 3 do i)					(null)
(for i = 4 to 3 do i);i						4
a=0;(for i = 3 to 3 do a=a+1);a					1
a=0;for i = 3 to 3 do a=a+1;a					1
a=0;for i = 1 to 3 by 2 do a=a+1;a				2
a=0;for i = 1 to 2 by 2 do a=a+1;a				1
for i = 1 to 2 by 2 do .;i					1
[catalan(3),catalan(4),catalan(5)]				[5,14,42]
catalan([3,4,5])						[5,14,42]
catalan(-1)							(catalan(-1))
for i = &d to 4 do .						(for i = (&d) to 4 do (null))
for i = 1 to 10 by &a do .					(for i = 1 to 10 by (&a) do (null))
print(null)							(null)
det([3,1:4,-2])							-10
det([1,2,3:-4,5,6:7,-8,9])					240
det([1,2,3:4,5,6])						(det([1,2,3:4,5,6]))
diagonal([1,2])							[1,0:0,2]
det([1,0,0,3:2,7,0,6:0,6,3,0:7,3,1,-5])				-546
det([1,3,-2,4:0,0,0,0:3,9,1,5:1,1,4,8])				0
"abc"!="abc"							0
"Zbc"!="abc"							1
[0]==0								1
[0]==[0]							1
[0,0]==[0]							0
[0,1:2,3]==[0,1:2,3]						1
[0,1:2,3]!=[0,1:2,3]						0
[0,0:2,3]!=[0,1:2,3]						1
[&d]==[1]							([(&d)]==[1])
sum(2,4,prime)							15
sin								(<builtin function>)
a=prime;a(3)							5
"abc"<"abcd"							1
"abce"<"abcd"							0
"abce">"abcd"							1
4<5<6								1
4<5<=6								1
4<5<=5								1
4<5<=4								0
5<5<=5								0
5==5<=5								1
5==5<=6								1
5>=5>=6								0
7>=5>=2								1
4>=5>=2								0
9>3<4>3<=5>2<=2							1
2>3<2								0
(2>3)<2								1
t=0;for i in [1,2,3:4,5,6:7,8,9] do t=t+i;t			45
t=0;for i in 3 do t=t+i;t					3
for i in [1,2,3] do i						3
for n in &d do .						(for n in (&d) do (null))
rowmedian([1,2,2,3:1,2,3,4:2,2,2,2:2,2,3,2])			[2:5/2:2:2]
median([1,2,3])							2
median([1,4,2,3])						5/2
sortv([1,2,2,3,1,2,3,4,2,2,2,2,2,2,3,2])			[1,1,2,2,2,2,2,2,2,2,2,2,3,3,3,4]
[1,2,3:4,5,6:7,8,8]^-2						[17,-62/3,9:-76/3,95/3,-14:31/3,-40/3,6]
[1,2,3:4,5,6:7,8,8]^4						[6981,8598,9597:15876,19557,21834:23273,28672,32014]
[1,2:3,4]^5							[1069,1558:2337,3406]
[1,2:2,4]^-1							([1,2:2,4]^-1)
a=[1,2:3,4];1/a							[-2,1:3/2,-1/2]
a=[1,2:3,4];a/2							[1/2,1:3/2,2]
2/[1,2]								(2/[1,2])
a=[1,2:3,4];b=[8,2:4,4];a/b					[-1/6,7/12:-1/6,13/12]
a=[1,2:3,4];|1/a|						[2,1:3/2,1/2]
(5/0)<3<2							((5/0)<3<2)
adj([3,2,-1:1,6,3:2,-4,0])					[12,4,12:6,2,-10:-16,16,16]
a=[2,31,2:12,37,2:8,2,1];adj(a)/det(a)==a^-1			1
adj([1,2])							(adj([1,2]))
f=set_size([0],12,3);g=set_size([0],36,1);function bb(g,h)=rows(*h);bb(f,&g)		36
[1,2,4:2,6,0]*[4,1,4,3:0,-1,3,1:2,7,5,2]			[12,27,30,13:8,-4,26,12]
c=[1,2];c@(3)=3;c						[1,2,3]
c=[1:2];c@(3)=3;c						[1:2:3]
b=[1,2,3:4,5,6:7,8,10];b@(9)					10
b=[1,2,3:4,5,6:7,8,10];b@(10)					([1,2,3:4,5,6:7,8,10]@(10))
b=[1,2,3:4,5,6:7,8,10];b@(10)=99;b				[1,2,3:4,5,6:7,8,10:99,0,0]
a@(3)=9;a							[0,0,9]
(adj(pascal(10)^-1)^-1)*pascal(10)==I(11)			1
pascal(3)							[1,0,0,0:1,1,0,0:1,2,1,0:1,3,3,1]
+1								1
---+-+++-+++-+-+-+3						3
2/4								1/2
2000000000000000000000000/4000000000000000000000000		1/2
`[[1:2],3]							`[[1:2],3]
`[[2/2:2],4-1]							`[[1:2],3]
`[[2/2:2:1],[4-1,2]]						`[[1:2:1],[3,2]]
5^-1								1/5
5^-2								1/25
