<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://twentyonewiki.info/index.php?action=history&amp;feed=atom&amp;title=Module%3AExponential_search</id>
	<title>Module:Exponential search - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://twentyonewiki.info/index.php?action=history&amp;feed=atom&amp;title=Module%3AExponential_search"/>
	<link rel="alternate" type="text/html" href="https://twentyonewiki.info/index.php?title=Module:Exponential_search&amp;action=history"/>
	<updated>2026-04-14T08:52:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>https://twentyonewiki.info/index.php?title=Module:Exponential_search&amp;diff=5683&amp;oldid=prev</id>
		<title>Buburka Rinderbuy: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://twentyonewiki.info/index.php?title=Module:Exponential_search&amp;diff=5683&amp;oldid=prev"/>
		<updated>2024-03-27T07:20:34Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:20, 27 March 2024&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key twenizlx_mw1497-mw20_:diff::1.12:old-5682:rev-5683 --&gt;
&lt;/table&gt;</summary>
		<author><name>Buburka Rinderbuy</name></author>
	</entry>
	<entry>
		<id>https://twentyonewiki.info/index.php?title=Module:Exponential_search&amp;diff=5682&amp;oldid=prev</id>
		<title>Template:Track listing&gt;Uzume: strict</title>
		<link rel="alternate" type="text/html" href="https://twentyonewiki.info/index.php?title=Module:Exponential_search&amp;diff=5682&amp;oldid=prev"/>
		<updated>2023-02-10T20:10:53Z</updated>

		<summary type="html">&lt;p&gt;strict&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module provides a generic exponential search algorithm.&lt;br /&gt;
require[[strict]]&lt;br /&gt;
&lt;br /&gt;
local checkType = require('libraryUtil').checkType&lt;br /&gt;
local floor = math.floor&lt;br /&gt;
&lt;br /&gt;
local function midPoint(lower, upper)&lt;br /&gt;
	return floor(lower + (upper - lower) / 2)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function search(testFunc, i, lower, upper)&lt;br /&gt;
	if testFunc(i) then&lt;br /&gt;
		if i + 1 == upper then&lt;br /&gt;
			return i&lt;br /&gt;
		end&lt;br /&gt;
		lower = i&lt;br /&gt;
		if upper then&lt;br /&gt;
			i = midPoint(lower, upper)&lt;br /&gt;
		else&lt;br /&gt;
			i = i * 2&lt;br /&gt;
		end&lt;br /&gt;
		return search(testFunc, i, lower, upper)&lt;br /&gt;
	else&lt;br /&gt;
		upper = i&lt;br /&gt;
		i = midPoint(lower, upper)&lt;br /&gt;
		return search(testFunc, i, lower, upper)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return function (testFunc, init)&lt;br /&gt;
	checkType('Exponential search', 1, testFunc, 'function')&lt;br /&gt;
	checkType('Exponential search', 2, init, 'number', true)&lt;br /&gt;
	if init and (init &amp;lt; 1 or init ~= floor(init) or init == math.huge) then&lt;br /&gt;
		error(string.format(&lt;br /&gt;
			&amp;quot;invalid init value '%s' detected in argument #2 to &amp;quot; ..&lt;br /&gt;
			&amp;quot;'Exponential search' (init value must be a positive integer)&amp;quot;,&lt;br /&gt;
			tostring(init)&lt;br /&gt;
		), 2)&lt;br /&gt;
	end&lt;br /&gt;
	init = init or 2&lt;br /&gt;
	if not testFunc(1) then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	return search(testFunc, init, 1, nil)&lt;br /&gt;
end&lt;/div&gt;</summary>
		<author><name>Template:Track listing&gt;Uzume</name></author>
	</entry>
</feed>