proc Sqrt
	filen	periodic.icn
	local	0,001000,i
	local	1,001000,j
	local	2,000020,rat
	local	3,000020,half
	local	4,000000,rational
	local	5,000000,integer
	local	6,000000,sqrt
	local	7,000000,mpyrat
	local	8,000000,addrat
	local	9,000000,divrat
	con	0,002000,1,5
	con	1,002000,1,1
	con	2,002000,1,2
	declend
	line	37
	colm	11
	mark	L1
	pnull
	pnull
	var	1
	line	40
	colm	4
	null
	int	0
	line	40
	colm	7
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	3
	var	4
	int	1
	int	2
	int	1
	line	42
	colm	20
	invoke	3
	line	42
	colm	9
	asgn
	unmark
lab L2
	mark	L3
	pnull
	var	2
	var	4
	var	5
	var	6
	var	0
	line	44
	colm	32
	invoke	1
	line	44
	colm	27
	invoke	1
	int	1
	int	1
	line	44
	colm	19
	invoke	3
	line	44
	colm	8
	asgn
	unmark
lab L3
	mark	L4
	pnull
	var	0
	var	4
	var	0
	int	1
	int	1
	line	46
	colm	17
	invoke	3
	line	46
	colm	6
	asgn
	unmark
lab L4
	mark	L5
	mark0
	pnull
	int	1
	var	1
	push1
	line	48
	colm	12
	toby
	pop
	mark0
	pnull
	var	2
	var	7
	var	3
	var	8
	var	2
	var	9
	var	0
	var	2
	int	1
	line	49
	colm	45
	invoke	3
	int	1
	line	49
	colm	33
	invoke	3
	line	49
	colm	20
	invoke	2
	line	49
	colm	11
	asgn
	unmark
lab L6
	efail
lab L7
	unmark
lab L5
	mark	L8
	mark	L9
	var	2
	line	51
	colm	4
	pret
lab L9
	pfail
	unmark
lab L8
	pnull
	line	53
	colm	1
	pfail
	end
proc rat2cf
	local	0,001000,rat
	local	1,000020,r
	local	2,000020,result
	local	3,000020,i
	local	4,000020,j
	local	5,000000,put
	local	6,000000,rational
	local	7,000000,integer
	local	8,000000,perseq
	con	0,002000,1,1
	con	1,002000,1,0
	declend
	line	55
	colm	11
	mark	L1
	pnull
	var	3
	pnull
	var	0
	line	58
	colm	12
	field	numer
	line	58
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	4
	pnull
	var	0
	line	59
	colm	12
	field	denom
	line	59
	colm	6
	asgn
	unmark
lab L2
	mark	L3
	pnull
	var	2
	pnull
	line	61
	colm	14
	llist	0
	line	61
	colm	11
	asgn
	unmark
lab L3
	mark	L4
lab L5
	mark	L5
	mark	L8
	var	5
	var	2
	pnull
	var	6
	var	7
	pnull
	var	3
	var	4
	line	64
	colm	37
	div
	line	64
	colm	34
	invoke	1
	int	0
	int	0
	line	64
	colm	26
	invoke	3
	line	64
	colm	48
	field	numer
	line	64
	colm	9
	invoke	2
	unmark
lab L8
	mark	L9
	pnull
	var	1
	pnull
	var	3
	var	4
	line	65
	colm	13
	mod
	line	65
	colm	8
	asgn
	unmark
lab L9
	mark	L10
	pnull
	var	3
	var	4
	line	66
	colm	8
	asgn
	unmark
lab L10
	mark	L11
	pnull
	var	4
	var	1
	line	67
	colm	8
	asgn
	unmark
lab L11
	mark0
	pnull
	var	4
	int	1
	line	68
	colm	11
	numeq
	unmark
	unmark
	pnull
	goto	L7
lab L6
	unmark
	goto	L5
lab L7
	unmark
lab L4
	mark	L12
	mark	L13
	var	8
	var	2
	pnull
	line	71
	colm	26
	llist	0
	line	71
	colm	17
	invoke	2
	line	71
	colm	4
	pret
lab L13
	pfail
	unmark
lab L12
	pnull
	line	73
	colm	1
	pfail
	end
proc cfapprox
	local	0,001000,lst
	local	1,000020,prev_n
	local	2,000020,prev_m
	local	3,000020,n
	local	4,000020,m
	local	5,000020,t
	local	6,000000,copy
	local	7,000000,put
	local	8,000000,get
	local	9,000000,rational
	con	0,002000,1,1
	con	1,002000,1,0
	declend
	line	75
	colm	11
	mark	L1
	pnull
	var	0
	var	6
	var	0
	line	78
	colm	15
	invoke	1
	line	78
	colm	8
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	1
	pnull
	int	0
	line	80
	colm	14
	llist	1
	line	80
	colm	11
	asgn
	unmark
lab L2
	mark	L3
	pnull
	var	2
	pnull
	int	1
	int	0
	line	81
	colm	14
	llist	2
	line	81
	colm	11
	asgn
	unmark
lab L3
	mark	L4
	mark	L5
	var	7
	var	1
	pnull
	var	8
	var	0
	line	83
	colm	19
	invoke	1
	line	83
	colm	24
	field	denom
	line	83
	colm	7
	invoke	2
	esusp
	goto	L6
lab L5
	line	83
	colm	34
	pfail
lab L6
	unmark
lab L4
	mark	L7
lab L8
	mark0
	pnull
	var	5
	var	8
	var	0
	line	85
	colm	18
	invoke	1
	line	85
	colm	12
	asgn
	unmark
	mark	L8
	mark	L11
	pnull
	var	3
	pnull
	pnull
	pnull
	var	5
	line	86
	colm	13
	field	denom
	var	8
	var	1
	line	86
	colm	25
	invoke	1
	line	86
	colm	20
	mult
	pnull
	pnull
	var	5
	line	86
	colm	37
	field	numer
	pnull
	var	1
	int	0
	line	86
	colm	52
	subsc
	line	86
	colm	44
	mult
	line	86
	colm	34
	plus
	line	86
	colm	9
	asgn
	unmark
lab L11
	mark	L12
	pnull
	var	4
	pnull
	pnull
	pnull
	var	5
	line	87
	colm	13
	field	denom
	var	8
	var	2
	line	87
	colm	25
	invoke	1
	line	87
	colm	20
	mult
	pnull
	pnull
	var	5
	line	87
	colm	37
	field	numer
	pnull
	var	2
	int	0
	line	87
	colm	52
	subsc
	line	87
	colm	44
	mult
	line	87
	colm	34
	plus
	line	87
	colm	9
	asgn
	unmark
lab L12
	mark	L13
	mark0
	var	9
	var	3
	var	4
	int	0
	line	88
	colm	23
	invoke	3
	line	88
	colm	7
	psusp
	pop
lab L14
	efail
lab L15
	unmark
lab L13
	mark	L16
	var	7
	var	1
	var	3
	line	89
	colm	10
	invoke	2
	unmark
lab L16
	mark	L17
	var	7
	var	2
	var	4
	line	90
	colm	10
	invoke	2
	unmark
lab L17
	mark0
	pnull
	pnull
	var	5
	line	91
	colm	11
	field	denom
	int	1
	line	91
	colm	18
	numne
	unmark
	mark	L18
	mark0
	pnull
	pnull
	var	1
	line	92
	colm	16
	bang
	dup
	pnull
	var	5
	line	92
	colm	29
	field	denom
	line	92
	colm	24
	div
	asgn
	pop
lab L19
	efail
lab L20
	unmark
lab L18
	mark0
	pnull
	pnull
	var	2
	line	93
	colm	16
	bang
	dup
	pnull
	var	5
	line	93
	colm	29
	field	denom
	line	93
	colm	24
	div
	asgn
	pop
lab L21
	efail
lab L22
lab L9
	unmark
	goto	L8
lab L10
	unmark
lab L7
	pnull
	line	97
	colm	1
	pfail
	end
proc dec2rat
	local	0,001000,pre
	local	1,001000,rep
	local	2,000020,s
	local	3,000000,ratred
	local	4,000000,rational
	local	5,000000,left
	con	0,010000,0
	con	1,002000,2,10
	con	2,002000,1,1
	declend
	line	99
	colm	11
	mark	L1
	pnull
	var	2
	str	0
	line	102
	colm	6
	asgn
	unmark
lab L1
	mark	L2
	mark0
	pnull
	var	2
	dup
	pnull
	pnull
	var	0
	line	104
	colm	35
	size
	pnull
	var	1
	line	104
	colm	42
	size
	line	104
	colm	40
	plus
	line	104
	colm	23
	limit
	mark	L5
	pnull
	var	0
	line	104
	colm	18
	bang
	esusp
	goto	L6
lab L5
lab L7
	mark0
	pnull
	var	1
	line	104
	colm	26
	bang
	chfail	L7
	esusp
lab L6
	lsusp
	line	104
	colm	12
	cat
	asgn
	pop
lab L3
	efail
lab L4
	unmark
lab L2
	mark	L8
	mark	L9
	var	3
	var	4
	pnull
	var	2
	var	5
	var	2
	pnull
	var	0
	line	106
	colm	39
	size
	line	106
	colm	35
	invoke	2
	line	106
	colm	29
	minus
	pnull
	pnull
	int	1
	pnull
	pnull
	var	0
	line	107
	colm	13
	size
	pnull
	var	1
	line	107
	colm	20
	size
	line	107
	colm	18
	plus
	line	107
	colm	10
	power
	pnull
	int	1
	pnull
	var	0
	line	107
	colm	33
	size
	line	107
	colm	31
	power
	line	107
	colm	26
	minus
	int	2
	line	106
	colm	26
	invoke	3
	line	106
	colm	17
	invoke	1
	line	106
	colm	4
	pret
lab L9
	pfail
	unmark
lab L8
	pnull
	line	109
	colm	1
	pfail
	end
proc rat2dec
	local	0,001000,rat
	local	1,000020,result
	local	2,000020,remainders
	local	3,000020,count
	local	4,000020,seq
	local	5,000000,copy
	local	6,000000,table
	local	7,000000,member
	local	8,000000,perseq
	local	9,000000,move
	local	10,000000,tab
	local	11,000000,insert
	con	0,010000,0
	con	1,002000,2,10
	con	2,002000,1,0
	con	3,002000,1,1
	declend
	line	111
	colm	11
	mark	L1
	pnull
	var	0
	var	5
	var	0
	line	114
	colm	15
	invoke	1
	line	114
	colm	8
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	1
	str	0
	line	116
	colm	11
	asgn
	unmark
lab L2
	mark	L3
	pnull
	var	2
	var	6
	line	118
	colm	23
	invoke	0
	line	118
	colm	15
	asgn
	unmark
lab L3
	mark	L4
	pnull
	pnull
	var	0
	line	120
	colm	7
	field	numer
	dup
	pnull
	var	0
	line	120
	colm	21
	field	denom
	line	120
	colm	14
	mod
	asgn
	unmark
lab L4
	mark	L5
	pnull
	pnull
	var	0
	line	121
	colm	7
	field	numer
	dup
	int	1
	line	121
	colm	14
	mult
	asgn
	unmark
lab L5
	mark	L6
	pnull
	var	3
	int	2
	line	123
	colm	10
	asgn
	unmark
lab L6
	mark	L7
lab L8
	mark0
	pnull
	pnull
	var	0
	line	125
	colm	13
	field	numer
	int	2
	line	125
	colm	20
	numgt
	unmark
	mark	L8
	mark	L11
	pnull
	var	3
	dup
	int	3
	line	126
	colm	13
	plus
	asgn
	unmark
lab L11
	mark	L12
	mark	L13
	var	7
	var	2
	pnull
	var	0
	line	127
	colm	32
	field	numer
	line	127
	colm	16
	invoke	2
	unmark
	mark	L15
	pnull
	var	4
	var	8
	line	128
	colm	23
	invoke	0
	line	128
	colm	14
	asgn
	unmark
lab L15
	mark	L16
	var	1
	line	129
	colm	17
	bscan
	mark	L17
	pnull
	pnull
	var	4
	line	130
	colm	16
	field	pre
	var	9
	pnull
	pnull
	var	2
	pnull
	var	0
	line	130
	colm	43
	field	numer
	line	130
	colm	39
	subsc
	int	3
	line	130
	colm	51
	minus
	line	130
	colm	28
	invoke	1
	line	130
	colm	21
	asgn
	unmark
lab L17
	pnull
	pnull
	var	4
	line	131
	colm	16
	field	rep
	var	10
	int	2
	line	131
	colm	27
	invoke	1
	line	131
	colm	21
	asgn
	line	129
	colm	17
	escan
	unmark
lab L16
	mark	L18
	var	4
	line	133
	colm	10
	pret
lab L18
	pfail
	goto	L14
lab L13
	var	11
	var	2
	pnull
	var	0
	line	135
	colm	34
	field	numer
	var	3
	line	135
	colm	18
	invoke	3
lab L14
	unmark
lab L12
	mark	L19
	pnull
	var	1
	dup
	pnull
	pnull
	var	0
	line	136
	colm	22
	field	numer
	pnull
	var	0
	line	136
	colm	34
	field	denom
	line	136
	colm	29
	div
	line	136
	colm	14
	cat
	asgn
	unmark
lab L19
	mark	L20
	pnull
	pnull
	var	0
	line	137
	colm	10
	field	numer
	dup
	pnull
	var	0
	line	137
	colm	24
	field	denom
	line	137
	colm	17
	mod
	asgn
	unmark
lab L20
	pnull
	pnull
	var	0
	line	138
	colm	10
	field	numer
	dup
	int	1
	line	138
	colm	17
	mult
	asgn
lab L9
	unmark
	goto	L8
lab L10
	unmark
lab L7
	mark	L21
	mark	L22
	var	8
	pnull
	pnull
	var	0
	line	141
	colm	22
	field	denom
	line	141
	colm	18
	llist	1
	pnull
	line	141
	colm	31
	llist	0
	line	141
	colm	17
	invoke	2
	line	141
	colm	4
	pret
lab L22
	pfail
	unmark
lab L21
	pnull
	line	143
	colm	1
	pfail
	end
proc repeater
	local	0,001000,seq
	local	1,001000,ratio
	local	2,001000,limit
	local	3,000020,init
	local	4,000020,i
	local	5,000020,prefix
	local	6,000020,results
	local	7,000020,segment
	local	8,000020,span
	local	9,000000,copy
	local	10,000000,lequiv
	local	11,000000,lextend
	local	12,000000,perseq
	local	13,000000,put
	local	14,000000,get
	con	0,002000,1,2
	con	1,004000,0.75
	con	2,002000,1,1
	declend
	line	145
	colm	11
	mark	L1
	pnull
	pnull
	var	1
	line	148
	colm	4
	null
	int	0
	line	148
	colm	11
	asgn
	unmark
lab L1
	mark	L2
	pnull
	pnull
	var	2
	line	149
	colm	4
	null
	real	1
	line	149
	colm	11
	asgn
	unmark
lab L2
	mark	L3
	pnull
	var	6
	var	9
	var	0
	line	151
	colm	19
	invoke	1
	line	151
	colm	12
	asgn
	unmark
lab L3
	mark	L4
	pnull
	var	5
	pnull
	line	153
	colm	14
	llist	0
	line	153
	colm	11
	asgn
	unmark
lab L4
	mark	L5
lab L6
	mark	L6
	mark	L9
	pnull
	var	8
	pnull
	pnull
	var	6
	line	156
	colm	15
	size
	var	1
	line	156
	colm	24
	div
	line	156
	colm	12
	asgn
	unmark
lab L9
	mark	L10
	mark0
	pnull
	var	4
	pnull
	int	2
	var	8
	push1
	line	157
	colm	20
	toby
	line	157
	colm	15
	asgn
	pop
	mark0
	mark	L13
	pnull
	var	7
	mark	L14
	pnull
	var	6
	int	2
	dup
	var	4
	line	158
	colm	30
	plus
	sect
	esusp
	goto	L15
lab L14
	unmark
	unmark
	goto	L11
lab L15
	line	158
	colm	18
	asgn
	unmark
lab L13
	mark0
	var	10
	var	11
	var	7
	pnull
	var	6
	line	159
	colm	37
	size
	line	159
	colm	27
	invoke	2
	var	6
	line	159
	colm	19
	invoke	2
	unmark
	mark	L16
	var	12
	var	5
	var	7
	line	160
	colm	26
	invoke	2
	line	160
	colm	13
	pret
lab L16
	pfail
	unmark
lab L11
	efail
lab L12
	unmark
lab L10
	mark	L17
	mark	L18
	var	13
	var	5
	var	14
	var	6
	line	162
	colm	22
	invoke	1
	line	162
	colm	10
	invoke	2
	esusp
	goto	L19
lab L18
	mark	L20
	var	12
	var	5
	var	6
	line	163
	colm	23
	invoke	2
	line	163
	colm	10
	pret
lab L20
	pfail
lab L19
	unmark
lab L17
	mark0
	pnull
	pnull
	var	5
	line	164
	colm	10
	size
	pnull
	var	2
	pnull
	var	0
	line	164
	colm	28
	size
	line	164
	colm	26
	mult
	line	164
	colm	18
	numgt
	unmark
	mark	L21
	var	12
	var	0
	pnull
	line	164
	colm	57
	llist	0
	line	164
	colm	51
	invoke	2
	line	164
	colm	38
	pret
lab L21
	pfail
lab L7
	unmark
	goto	L6
lab L8
	unmark
lab L5
	pnull
	line	167
	colm	1
	pfail
	end
proc seqimage
	local	0,001000,seq
	local	1,000020,result
	con	0,010000,0
	con	1,010000,1,054
	con	2,010000,1,133
	con	3,002000,1,0
	con	4,002000,1,1
	con	5,010000,1,135
	declend
	line	169
	colm	11
	mark	L1
	pnull
	var	1
	str	0
	line	172
	colm	11
	asgn
	unmark
lab L1
	mark	L2
	mark0
	pnull
	var	1
	dup
	pnull
	pnull
	pnull
	var	0
	line	174
	colm	26
	field	pre
	line	174
	colm	22
	bang
	str	1
	line	174
	colm	31
	cat
	line	174
	colm	17
	cat
	asgn
	pop
lab L3
	efail
lab L4
	unmark
lab L2
	mark	L5
	pnull
	var	1
	dup
	str	2
	line	176
	colm	11
	cat
	asgn
	unmark
lab L5
	mark	L6
	mark	L7
	pnull
	pnull
	pnull
	var	0
	line	178
	colm	11
	field	rep
	line	178
	colm	7
	size
	int	3
	line	178
	colm	16
	numgt
	unmark
	mark	L9
	mark0
	pnull
	var	1
	dup
	pnull
	pnull
	pnull
	var	0
	line	179
	colm	29
	field	rep
	line	179
	colm	25
	bang
	str	1
	line	179
	colm	34
	cat
	line	179
	colm	20
	cat
	asgn
	pop
lab L10
	efail
lab L11
	unmark
lab L9
	pnull
	pnull
	var	1
	pnull
	int	4
	line	180
	colm	14
	neg
	line	180
	colm	13
	subsc
	str	5
	line	180
	colm	18
	asgn
	goto	L8
lab L7
	pnull
	var	1
	dup
	str	5
	line	182
	colm	16
	cat
	asgn
lab L8
	unmark
lab L6
	mark	L12
	mark	L13
	var	1
	line	184
	colm	4
	pret
lab L13
	pfail
	unmark
lab L12
	pnull
	line	186
	colm	1
	pfail
	end
