<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://arabrus.kuwaes.com/wiki/action/history/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Exponential_search?feed=atom</id>
	<title>Модуль:Exponential search - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://arabrus.kuwaes.com/wiki/action/history/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Exponential_search?feed=atom"/>
	<link rel="alternate" type="text/html" href="https://arabrus.kuwaes.com/wiki/action/history/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Exponential_search"/>
	<updated>2026-11-17T01:58:56Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.39.0</generator>
	<entry>
		<id>https://arabrus.kuwaes.com/w/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Exponential_search&amp;diff=482&amp;oldid=prev</id>
		<title>Abutalha: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="https://arabrus.kuwaes.com/w/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Exponential_search&amp;diff=482&amp;oldid=prev"/>
		<updated>2022-12-24T02:31:50Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&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;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 02:31, 24 декабря 2022&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key arabrus-main:diff::1.12:old-481:rev-482 --&gt;
&lt;/table&gt;</summary>
		<author><name>Abutalha</name></author>
	</entry>
	<entry>
		<id>https://arabrus.kuwaes.com/w/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Exponential_search&amp;diff=481&amp;oldid=prev</id>
		<title>wiki&gt;Mr. Stradivarius: Protected &quot;Module:Exponential search&quot;: High-risk Lua module: used in Module:Highest archive number ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</title>
		<link rel="alternate" type="text/html" href="https://arabrus.kuwaes.com/w/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Exponential_search&amp;diff=481&amp;oldid=prev"/>
		<updated>2019-10-08T16:14:11Z</updated>

		<summary type="html">&lt;p&gt;Protected &amp;quot;&lt;a href=&quot;/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Exponential_search&quot; title=&quot;Модуль:Exponential search&quot;&gt;Module:Exponential search&lt;/a&gt;&amp;quot;: &lt;a href=&quot;/wiki/action/edit/WP:High-risk_templates?redlink=1&quot; class=&quot;new&quot; title=&quot;WP:High-risk templates (страница не существует)&quot;&gt;High-risk Lua module&lt;/a&gt;: used in &lt;a href=&quot;/wiki/action/edit/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Highest_archive_number?redlink=1&quot; class=&quot;new&quot; title=&quot;Модуль:Highest archive number (страница не существует)&quot;&gt;Module:Highest archive number&lt;/a&gt; ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module provides a generic exponential search algorithm.&lt;br /&gt;
&lt;br /&gt;
local checkType = require(&amp;#039;libraryUtil&amp;#039;).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(&amp;#039;Exponential search&amp;#039;, 1, testFunc, &amp;#039;function&amp;#039;)&lt;br /&gt;
	checkType(&amp;#039;Exponential search&amp;#039;, 2, init, &amp;#039;number&amp;#039;, 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 &amp;#039;%s&amp;#039; detected in argument #2 to &amp;quot; ..&lt;br /&gt;
			&amp;quot;&amp;#039;Exponential search&amp;#039; (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>wiki&gt;Mr. Stradivarius</name></author>
	</entry>
</feed>