version	U12.1.00
uid	polynom.u1-1786032991-0
impl	error
link	strings.u
link	tables.u
global	7
	0,000005,str2poly,1
	1,000005,polyadd,2
	2,000005,polysub,2
	3,000005,polymul,2
	4,000005,polyexp,2
	5,000005,poly2str,1
	6,000005,poly2profile,1

proc str2poly
	local	0,001000,str
	local	1,000020,poly
	local	2,000020,var
	local	3,000020,vars
	local	4,000020,term
	local	5,000020,factor
	local	6,000020,power
	local	7,000000,table
	local	8,000000,move
	local	9,000000,tab
	local	10,000000,upto
	local	11,000000,many
	local	12,000000,integer
	local	13,000000,repl
	local	14,000000,csort
	con	0,002000,1,0
	con	1,002000,1,1
	con	2,020000,2,055,053
	con	3,020000,2,053,055
	con	4,010000,0
	declend
	filen	polynom.icn
	line	29
	colm	11
	synt	any
	mark	L1
	pnull
	var	1
	var	7
	int	0
	line	32
	colm	17
	synt	any
	invoke	1
	line	32
	colm	9
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	var	0
	line	34
	colm	8
	synt	any
	bscan
lab L3
	line	35
	colm	7
	synt	while
	mark0
	pnull
	var	4
	pnull
	var	8
	int	1
	line	35
	colm	26
	synt	any
	invoke	1
	var	9
	mark	L6
	var	10
	cset	2
	line	35
	colm	41
	synt	any
	invoke	1
	line	35
	colm	48
	synt	any
	esusp
	goto	L7
lab L6
	int	0
lab L7
	line	35
	colm	36
	synt	any
	invoke	1
	line	35
	colm	30
	synt	any
	cat
	line	35
	colm	18
	synt	any
	asgn
	unmark
	mark	L3
	var	4
	line	36
	colm	15
	synt	any
	bscan
	mark	L8
	pnull
	var	5
	int	1
	line	37
	colm	20
	synt	any
	asgn
	unmark
lab L8
	mark	L9
	pnull
	var	5
	var	9
	var	11
	pnull
	line	38
	colm	32
	synt	any
	keywd	digits
	cset	3
	line	38
	colm	40
	synt	any
	unions
	line	38
	colm	31
	synt	any
	invoke	1
	line	38
	colm	26
	synt	any
	invoke	1
	line	38
	colm	20
	synt	any
	asgn
	unmark
lab L9
	mark	L10
	var	9
	int	0
	line	39
	colm	16
	synt	any
	invoke	1
	line	39
	colm	20
	synt	any
	bscan
	mark	L11
	pnull
	var	3
	str	4
	line	40
	colm	21
	synt	any
	asgn
	unmark
lab L11
lab L12
	line	41
	colm	16
	synt	while
	mark0
	pnull
	var	2
	var	8
	int	1
	line	41
	colm	33
	synt	any
	invoke	1
	line	41
	colm	26
	synt	any
	asgn
	unmark
	mark	L12
	mark	L15
	pnull
	var	6
	int	1
	line	42
	colm	25
	synt	any
	asgn
	unmark
lab L15
	mark	L16
	pnull
	var	6
	var	12
	var	9
	var	11
	line	43
	colm	45
	synt	any
	keywd	digits
	line	43
	colm	44
	synt	any
	invoke	1
	line	43
	colm	39
	synt	any
	invoke	1
	line	43
	colm	35
	synt	any
	invoke	1
	line	43
	colm	25
	synt	any
	asgn
	unmark
lab L16
	pnull
	var	3
	dup
	var	13
	var	2
	var	6
	line	44
	colm	33
	synt	any
	invoke	2
	line	44
	colm	24
	synt	any
	cat
	asgn
lab L13
	unmark
	goto	L12
lab L14
	line	41
	colm	16
	synt	endwhile
	line	39
	colm	20
	synt	any
	escan
	unmark
lab L10
	pnull
	pnull
	var	1
	var	14
	var	3
	line	47
	colm	23
	synt	any
	invoke	1
	line	47
	colm	17
	synt	any
	subsc
	dup
	var	12
	var	5
	line	47
	colm	42
	synt	any
	invoke	1
	line	47
	colm	31
	synt	any
	plus
	asgn
	line	36
	colm	15
	synt	any
	escan
lab L4
	unmark
	goto	L3
lab L5
	line	35
	colm	7
	synt	endwhile
	line	34
	colm	8
	synt	any
	escan
	unmark
lab L2
	mark	L17
	mark	L18
	var	1
	line	52
	colm	4
	synt	any
	pret
lab L18
	synt	any
	pfail
	unmark
lab L17
	pnull
	line	54
	colm	1
	synt	any
	pfail
	end
proc polyadd
	local	0,001000,poly1
	local	1,001000,poly2
	local	2,000020,poly
	local	3,000020,keys
	local	4,000020,k
	local	5,000000,sort
	local	6,000000,set
	local	7,000000,keylist
	local	8,000000,table
	con	0,002000,1,0
	declend
	line	56
	colm	11
	synt	any
	mark	L1
	pnull
	var	3
	var	5
	pnull
	var	6
	var	7
	var	0
	line	59
	colm	28
	synt	any
	invoke	1
	line	59
	colm	20
	synt	any
	invoke	1
	var	6
	var	7
	var	1
	line	59
	colm	51
	synt	any
	invoke	1
	line	59
	colm	43
	synt	any
	invoke	1
	line	59
	colm	37
	synt	any
	unions
	line	59
	colm	16
	synt	any
	invoke	1
	line	59
	colm	9
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	2
	var	8
	int	0
	line	61
	colm	17
	synt	any
	invoke	1
	line	61
	colm	9
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	line	63
	colm	4
	synt	every
	mark0
	pnull
	var	4
	pnull
	var	3
	line	63
	colm	15
	synt	any
	bang
	line	63
	colm	12
	synt	any
	asgn
	pop
	mark0
	pnull
	pnull
	var	2
	var	4
	line	64
	colm	11
	synt	any
	subsc
	pnull
	pnull
	var	0
	var	4
	line	64
	colm	23
	synt	any
	subsc
	pnull
	var	1
	var	4
	line	64
	colm	34
	synt	any
	subsc
	line	64
	colm	27
	synt	any
	plus
	line	64
	colm	15
	synt	any
	asgn
	unmark
lab L4
	efail
lab L5
	line	63
	colm	4
	synt	endevery
	unmark
lab L3
	mark	L6
	mark	L7
	var	2
	line	66
	colm	4
	synt	any
	pret
lab L7
	synt	any
	pfail
	unmark
lab L6
	pnull
	line	68
	colm	1
	synt	any
	pfail
	end
proc polysub
	local	0,001000,poly1
	local	1,001000,poly2
	local	2,000020,poly
	local	3,000020,keys
	local	4,000020,k
	local	5,000000,sort
	local	6,000000,set
	local	7,000000,keylist
	local	8,000000,table
	con	0,002000,1,0
	declend
	line	70
	colm	11
	synt	any
	mark	L1
	pnull
	var	3
	var	5
	pnull
	var	6
	var	7
	var	0
	line	73
	colm	28
	synt	any
	invoke	1
	line	73
	colm	20
	synt	any
	invoke	1
	var	6
	var	7
	var	1
	line	73
	colm	51
	synt	any
	invoke	1
	line	73
	colm	43
	synt	any
	invoke	1
	line	73
	colm	37
	synt	any
	unions
	line	73
	colm	16
	synt	any
	invoke	1
	line	73
	colm	9
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	2
	var	8
	int	0
	line	75
	colm	17
	synt	any
	invoke	1
	line	75
	colm	9
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	line	77
	colm	4
	synt	every
	mark0
	pnull
	var	4
	pnull
	var	3
	line	77
	colm	15
	synt	any
	bang
	line	77
	colm	12
	synt	any
	asgn
	pop
	mark0
	pnull
	pnull
	var	2
	var	4
	line	78
	colm	11
	synt	any
	subsc
	pnull
	pnull
	var	0
	var	4
	line	78
	colm	23
	synt	any
	subsc
	pnull
	var	1
	var	4
	line	78
	colm	34
	synt	any
	subsc
	line	78
	colm	27
	synt	any
	minus
	line	78
	colm	15
	synt	any
	asgn
	unmark
lab L4
	efail
lab L5
	line	77
	colm	4
	synt	endevery
	unmark
lab L3
	mark	L6
	mark	L7
	var	2
	line	80
	colm	4
	synt	any
	pret
lab L7
	synt	any
	pfail
	unmark
lab L6
	pnull
	line	82
	colm	1
	synt	any
	pfail
	end
proc polymul
	local	0,001000,poly1
	local	1,001000,poly2
	local	2,000020,poly
	local	3,000020,keys1
	local	4,000020,keys2
	local	5,000020,k1
	local	6,000020,k2
	local	7,000000,keylist
	local	8,000000,table
	local	9,000000,csort
	con	0,002000,1,0
	declend
	line	84
	colm	11
	synt	any
	mark	L1
	pnull
	var	3
	var	7
	var	0
	line	87
	colm	20
	synt	any
	invoke	1
	line	87
	colm	10
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	4
	var	7
	var	1
	line	88
	colm	20
	synt	any
	invoke	1
	line	88
	colm	10
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	pnull
	var	2
	var	8
	int	0
	line	90
	colm	17
	synt	any
	invoke	1
	line	90
	colm	9
	synt	any
	asgn
	unmark
lab L3
	mark	L4
	line	92
	colm	4
	synt	every
	mark0
	pnull
	var	5
	pnull
	var	3
	line	92
	colm	16
	synt	any
	bang
	line	92
	colm	13
	synt	any
	asgn
	pop
	mark0
	line	93
	colm	7
	synt	every
	mark0
	pnull
	var	6
	pnull
	var	4
	line	93
	colm	19
	synt	any
	bang
	line	93
	colm	16
	synt	any
	asgn
	pop
	mark0
	pnull
	pnull
	var	2
	var	9
	pnull
	var	5
	var	6
	line	94
	colm	24
	synt	any
	cat
	line	94
	colm	20
	synt	any
	invoke	1
	line	94
	colm	14
	synt	any
	subsc
	dup
	pnull
	pnull
	var	0
	var	5
	line	94
	colm	41
	synt	any
	subsc
	pnull
	var	1
	var	6
	line	94
	colm	53
	synt	any
	subsc
	line	94
	colm	46
	synt	any
	mult
	line	94
	colm	32
	synt	any
	plus
	asgn
	unmark
lab L7
	efail
lab L8
	line	93
	colm	7
	synt	endevery
	unmark
lab L5
	efail
lab L6
	line	92
	colm	4
	synt	endevery
	unmark
lab L4
	mark	L9
	mark	L10
	var	2
	line	96
	colm	4
	synt	any
	pret
lab L10
	synt	any
	pfail
	unmark
lab L9
	pnull
	line	98
	colm	1
	synt	any
	pfail
	end
proc polyexp
	local	0,001000,poly1
	local	1,001000,i
	local	2,000020,poly
	local	3,000000,copy
	local	4,000000,polymul
	con	0,002000,1,1
	declend
	line	100
	colm	11
	synt	any
	mark	L1
	pnull
	var	2
	var	3
	var	0
	line	103
	colm	16
	synt	any
	invoke	1
	line	103
	colm	9
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	line	105
	colm	4
	synt	every
	mark0
	pnull
	int	0
	pnull
	var	1
	int	0
	line	105
	colm	17
	synt	any
	minus
	push1
	line	105
	colm	12
	synt	any
	toby
	pop
	mark0
	pnull
	var	2
	var	4
	var	2
	var	0
	line	106
	colm	22
	synt	any
	invoke	2
	line	106
	colm	12
	synt	any
	asgn
	unmark
lab L3
	efail
lab L4
	line	105
	colm	4
	synt	endevery
	unmark
lab L2
	mark	L5
	mark	L6
	var	2
	line	108
	colm	4
	synt	any
	pret
lab L6
	synt	any
	pfail
	unmark
lab L5
	pnull
	line	110
	colm	1
	synt	any
	pfail
	end
proc poly2str
	local	0,001000,poly
	local	1,000020,str
	local	2,000020,keys
	local	3,000020,k
	local	4,000020,count
	local	5,000020,var
	local	6,000000,keylist
	local	7,000000,move
	local	8,000000,tab
	local	9,000000,many
	con	0,010000,0
	con	1,002000,1,0
	con	2,002000,1,1
	con	3,010000,1,053
	con	4,010000,1,055
	con	5,002000,1,2
	declend
	line	112
	colm	11
	synt	any
	mark	L1
	pnull
	var	2
	var	6
	var	0
	line	115
	colm	19
	synt	any
	invoke	1
	line	115
	colm	9
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	1
	str	0
	line	117
	colm	8
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	line	119
	colm	4
	synt	every
	mark0
	pnull
	var	3
	pnull
	var	2
	line	119
	colm	15
	synt	any
	bang
	line	119
	colm	12
	synt	any
	asgn
	pop
	mark0
	mark	L6
	line	120
	colm	7
	synt	ifelse
	mark	L7
	pnull
	pnull
	var	0
	var	3
	line	120
	colm	14
	synt	any
	subsc
	int	1
	line	120
	colm	18
	synt	any
	numeq
	unmark
	unmark
	unmark
	goto	L4
	goto	L8
lab L7
	line	121
	colm	12
	synt	ifelse
	mark	L9
	pnull
	pnull
	var	0
	var	3
	line	121
	colm	19
	synt	any
	subsc
	int	2
	line	121
	colm	23
	synt	any
	numgt
	unmark
	pnull
	var	1
	dup
	pnull
	str	3
	pnull
	var	0
	var	3
	line	121
	colm	52
	synt	any
	subsc
	line	121
	colm	45
	synt	any
	cat
	line	121
	colm	36
	synt	any
	cat
	asgn
	goto	L10
lab L9
	line	122
	colm	12
	synt	ifelse
	mark	L11
	pnull
	pnull
	var	0
	var	3
	line	122
	colm	19
	synt	any
	subsc
	pnull
	int	2
	line	122
	colm	25
	synt	any
	neg
	line	122
	colm	23
	synt	any
	numeq
	unmark
	pnull
	var	1
	dup
	str	4
	line	122
	colm	37
	synt	any
	cat
	asgn
	goto	L12
lab L11
	line	123
	colm	12
	synt	ifelse
	mark	L13
	pnull
	pnull
	var	0
	var	3
	line	123
	colm	19
	synt	any
	subsc
	int	1
	line	123
	colm	23
	synt	any
	numlt
	unmark
	pnull
	var	1
	dup
	pnull
	var	0
	var	3
	line	123
	colm	45
	synt	any
	subsc
	line	123
	colm	36
	synt	any
	cat
	asgn
	goto	L14
lab L13
	pnull
	var	1
	dup
	str	3
	line	124
	colm	16
	synt	any
	cat
	asgn
lab L14
	line	123
	colm	12
	synt	endifelse
lab L12
	line	122
	colm	12
	synt	endifelse
lab L10
	line	121
	colm	12
	synt	endifelse
lab L8
	line	120
	colm	7
	synt	endifelse
	unmark
lab L6
	var	3
	line	125
	colm	9
	synt	any
	bscan
lab L15
	line	126
	colm	10
	synt	while
	mark0
	pnull
	var	5
	var	7
	int	2
	line	126
	colm	27
	synt	any
	invoke	1
	line	126
	colm	20
	synt	any
	asgn
	unmark
	mark	L15
	mark	L18
	pnull
	var	4
	int	2
	line	127
	colm	19
	synt	any
	asgn
	unmark
lab L18
	mark	L19
	pnull
	var	4
	dup
	pnull
	var	8
	var	9
	var	5
	line	128
	colm	32
	synt	any
	invoke	1
	line	128
	colm	27
	synt	any
	invoke	1
	line	128
	colm	23
	synt	any
	size
	line	128
	colm	19
	synt	any
	plus
	asgn
	unmark
lab L19
	line	129
	colm	13
	synt	ifelse
	mark	L20
	pnull
	var	4
	int	2
	line	129
	colm	22
	synt	any
	numeq
	unmark
	pnull
	var	1
	dup
	var	5
	line	129
	colm	35
	synt	any
	cat
	asgn
	goto	L21
lab L20
	pnull
	var	1
	dup
	pnull
	var	5
	var	4
	line	130
	colm	31
	synt	any
	cat
	line	130
	colm	22
	synt	any
	cat
	asgn
lab L21
	line	129
	colm	13
	synt	endifelse
lab L16
	unmark
	goto	L15
lab L17
	line	126
	colm	10
	synt	endwhile
	line	125
	colm	9
	synt	any
	escan
	unmark
lab L4
	efail
lab L5
	line	119
	colm	4
	synt	endevery
	unmark
lab L3
	mark	L22
	mark	L23
	pnull
	var	1
	int	5
	int	1
	line	135
	colm	16
	synt	any
	synt	any
	sect
	line	135
	colm	4
	synt	any
	pret
lab L23
	synt	any
	pfail
	unmark
lab L22
	pnull
	line	137
	colm	1
	synt	any
	pfail
	end
proc poly2profile
	local	0,001000,poly
	local	1,000020,str
	local	2,000020,keys
	local	3,000020,k
	local	4,000020,count
	local	5,000020,var
	local	6,000000,keylist
	local	7,000000,repl
	con	0,010000,0
	con	1,002000,1,0
	declend
	line	139
	colm	11
	synt	any
	mark	L1
	pnull
	var	2
	var	6
	var	0
	line	142
	colm	19
	synt	any
	invoke	1
	line	142
	colm	9
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	1
	str	0
	line	144
	colm	8
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	line	146
	colm	4
	synt	every
	mark0
	pnull
	var	3
	pnull
	var	2
	line	146
	colm	15
	synt	any
	bang
	line	146
	colm	12
	synt	any
	asgn
	pop
	mark0
	pnull
	var	1
	dup
	var	7
	var	3
	pnull
	int	1
	pnull
	var	0
	var	3
	line	147
	colm	33
	synt	any
	subsc
	line	147
	colm	27
	synt	any
	numlt
	line	147
	colm	20
	synt	any
	invoke	2
	line	147
	colm	11
	synt	any
	cat
	asgn
	unmark
lab L4
	efail
lab L5
	line	146
	colm	4
	synt	endevery
	unmark
lab L3
	mark	L6
	mark	L7
	var	1
	line	149
	colm	4
	synt	any
	pret
lab L7
	synt	any
	pfail
	unmark
lab L6
	pnull
	line	151
	colm	1
	synt	any
	pfail
	end
