<br />
<b>Notice</b>:  Trying to access array offset on value of type bool in <b>/mnt/cpcwiki-httpdocs/includes/libs/IPSet.php</b> on line <b>243</b><br />
<br />
<b>Notice</b>:  Trying to access array offset on value of type bool in <b>/mnt/cpcwiki-httpdocs/includes/libs/IPSet.php</b> on line <b>246</b><br />
<br />
<b>Notice</b>:  Trying to access array offset on value of type bool in <b>/mnt/cpcwiki-httpdocs/includes/libs/IPSet.php</b> on line <b>243</b><br />
<br />
<b>Notice</b>:  Trying to access array offset on value of type bool in <b>/mnt/cpcwiki-httpdocs/includes/libs/IPSet.php</b> on line <b>246</b><br />
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://oldwiki.cpcwiki.eu/index.php?action=history&amp;feed=atom&amp;title=Programming%3AFast_16_bit_Square_Root</id>
		<title>Programming:Fast 16 bit Square Root - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://oldwiki.cpcwiki.eu/index.php?action=history&amp;feed=atom&amp;title=Programming%3AFast_16_bit_Square_Root"/>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Fast_16_bit_Square_Root&amp;action=history"/>
		<updated>2026-08-28T22:20:00Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.25.1</generator>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Programming:Fast_16_bit_Square_Root&amp;diff=90908&amp;oldid=prev</id>
		<title>Ygdrazil at 08:43, 1 September 2014</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Fast_16_bit_Square_Root&amp;diff=90908&amp;oldid=prev"/>
				<updated>2014-09-01T08:43:51Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 08:43, 1 September 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L118&quot; &gt;Line 118:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 118:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	ret&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	ret&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Programming]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ygdrazil</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Programming:Fast_16_bit_Square_Root&amp;diff=18788&amp;oldid=prev</id>
		<title>Executioner: Fixed last unroll</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Fast_16_bit_Square_Root&amp;diff=18788&amp;oldid=prev"/>
				<updated>2007-09-19T05:22:31Z</updated>
		
		<summary type="html">&lt;p&gt;Fixed last unroll&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 05:22, 19 September 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L109&quot; &gt;Line 109:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 109:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	ld a,d&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	ld a,d&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	cp (hl)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	cp (hl)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	jr nz,$ + &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;6&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	jr nz,$ + &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;5&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	dec h&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	dec h&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	ld a,e&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	ld a,e&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:18787:newid:18788 --&gt;
&lt;/table&gt;</summary>
		<author><name>Executioner</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Programming:Fast_16_bit_Square_Root&amp;diff=18787&amp;oldid=prev</id>
		<title>Executioner: New page</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Fast_16_bit_Square_Root&amp;diff=18787&amp;oldid=prev"/>
				<updated>2007-09-19T05:20:41Z</updated>
		
		<summary type="html">&lt;p&gt;New page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This routine was written by [[User:Executioner|The Executioner]] based on the fast pre-calculated square routine and an algorithm by Milos &amp;quot;baze&amp;quot; Bazelides, with 16 bit arithmetic removed for faster performance.&lt;br /&gt;
&lt;br /&gt;
The initialisation routine, used to build the squares table (same as for the Pre-calculated Square table (my version)).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	ld de,1&lt;br /&gt;
	ld hl,0&lt;br /&gt;
	ld ix,sqtab&lt;br /&gt;
sqloop:	ld (ix + 0),l&lt;br /&gt;
	inc hx&lt;br /&gt;
	ld (ix + 0),h&lt;br /&gt;
	dec hx&lt;br /&gt;
	add hl,de&lt;br /&gt;
	inc de&lt;br /&gt;
	inc de&lt;br /&gt;
	inc lx&lt;br /&gt;
	jr nz,sqloop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The actual 16 bit square root routine.&lt;br /&gt;
&lt;br /&gt;
'''Input:''' DE = ''The number you want to find the square root of''&lt;br /&gt;
&lt;br /&gt;
'''Output:''' A = ''Square root of the number supplied in DE''&lt;br /&gt;
&lt;br /&gt;
'''Destroys:''' HL&lt;br /&gt;
&lt;br /&gt;
'''Call:''' CALL SqrtDE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SqrtDE:	ld hl,sqtab + #180&lt;br /&gt;
	ld a,d&lt;br /&gt;
	cp (hl)&lt;br /&gt;
	jr nz,$ + 6&lt;br /&gt;
	dec h&lt;br /&gt;
	ld a,e&lt;br /&gt;
	cp (hl)&lt;br /&gt;
	inc h&lt;br /&gt;
	set 6,l&lt;br /&gt;
	jr nc,$ + 4&lt;br /&gt;
	res 7,l&lt;br /&gt;
&lt;br /&gt;
	ld a,d&lt;br /&gt;
	cp (hl)&lt;br /&gt;
	jr nz,$ + 6&lt;br /&gt;
	dec h&lt;br /&gt;
	ld a,e&lt;br /&gt;
	cp (hl)&lt;br /&gt;
	inc h&lt;br /&gt;
	set 5,l&lt;br /&gt;
	jr nc,$ + 4&lt;br /&gt;
	res 6,l&lt;br /&gt;
&lt;br /&gt;
	ld a,d&lt;br /&gt;
	cp (hl)&lt;br /&gt;
	jr nz,$ + 6&lt;br /&gt;
	dec h&lt;br /&gt;
	ld a,e&lt;br /&gt;
	cp (hl)&lt;br /&gt;
	inc h&lt;br /&gt;
	set 4,l&lt;br /&gt;
	jr nc,$ + 4&lt;br /&gt;
	res 5,l&lt;br /&gt;
&lt;br /&gt;
	ld a,d&lt;br /&gt;
	cp (hl)&lt;br /&gt;
	jr nz,$ + 6&lt;br /&gt;
	dec h&lt;br /&gt;
	ld a,e&lt;br /&gt;
	cp (hl)&lt;br /&gt;
	inc h&lt;br /&gt;
	set 3,l&lt;br /&gt;
	jr nc,$ + 4&lt;br /&gt;
	res 4,l&lt;br /&gt;
&lt;br /&gt;
	ld a,d&lt;br /&gt;
	cp (hl)&lt;br /&gt;
	jr nz,$ + 6&lt;br /&gt;
	dec h&lt;br /&gt;
	ld a,e&lt;br /&gt;
	cp (hl)&lt;br /&gt;
	inc h&lt;br /&gt;
	set 2,l&lt;br /&gt;
	jr nc,$ + 4&lt;br /&gt;
	res 3,l&lt;br /&gt;
&lt;br /&gt;
	ld a,d&lt;br /&gt;
	cp (hl)&lt;br /&gt;
	jr nz,$ + 6&lt;br /&gt;
	dec h&lt;br /&gt;
	ld a,e&lt;br /&gt;
	cp (hl)&lt;br /&gt;
	inc h&lt;br /&gt;
	set 1,l&lt;br /&gt;
	jr nc,$ + 4&lt;br /&gt;
	res 2,l&lt;br /&gt;
&lt;br /&gt;
	ld a,d&lt;br /&gt;
	cp (hl)&lt;br /&gt;
	jr nz,$ + 6&lt;br /&gt;
	dec h&lt;br /&gt;
	ld a,e&lt;br /&gt;
	cp (hl)&lt;br /&gt;
	inc h&lt;br /&gt;
	inc l&lt;br /&gt;
	jr nc,$ + 4&lt;br /&gt;
	res 1,l&lt;br /&gt;
&lt;br /&gt;
	ld a,d&lt;br /&gt;
	cp (hl)&lt;br /&gt;
	jr nz,$ + 6&lt;br /&gt;
	dec h&lt;br /&gt;
	ld a,e&lt;br /&gt;
	cp (hl)&lt;br /&gt;
	ld a,l&lt;br /&gt;
	ret nc&lt;br /&gt;
	dec a&lt;br /&gt;
	ret&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Executioner</name></author>	</entry>

	</feed>