<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://nssportwiki.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ADecimals</id>
	<title>Module:Decimals - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nssportwiki.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ADecimals"/>
	<link rel="alternate" type="text/html" href="https://nssportwiki.com/index.php?title=Module:Decimals&amp;action=history"/>
	<updated>2026-05-16T18:41:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>https://nssportwiki.com/index.php?title=Module:Decimals&amp;diff=72053&amp;oldid=prev</id>
		<title>Osarius: 1 revision imported: bulk import from rabastor wiki (Osarius) - part 1</title>
		<link rel="alternate" type="text/html" href="https://nssportwiki.com/index.php?title=Module:Decimals&amp;diff=72053&amp;oldid=prev"/>
		<updated>2026-01-20T15:14:11Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported: bulk import from rabastor wiki (Osarius) - part 1&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:14, 20 January 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en-GB&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Osarius</name></author>
	</entry>
	<entry>
		<id>https://nssportwiki.com/index.php?title=Module:Decimals&amp;diff=72052&amp;oldid=prev</id>
		<title>Admin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://nssportwiki.com/index.php?title=Module:Decimals&amp;diff=72052&amp;oldid=prev"/>
		<updated>2015-08-11T22:33:00Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require(&amp;#039;Module:No globals&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p._main(n, d)&lt;br /&gt;
	local num = tonumber(n)&lt;br /&gt;
	if not num then&lt;br /&gt;
		error(&amp;#039;Unable to convert &amp;quot;&amp;#039; .. tostring(n) .. &amp;#039;&amp;quot; to a number&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
	local decimals = tonumber(d)&lt;br /&gt;
	if not decimals then&lt;br /&gt;
		error(&amp;#039;Unable to convert &amp;quot;&amp;#039; .. tostring(d) .. &amp;#039;&amp;quot; to a number&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
	local maxDecimals = 14 - math.floor(math.log10(num)) -- to allow a maximum of 15 significant figures, which is the highest guaranteed correct with doubles&lt;br /&gt;
	if decimals &amp;gt; maxDecimals then decimals = maxDecimals end&lt;br /&gt;
	local mult = 10^decimals&lt;br /&gt;
	num = math.floor(num * mult + 0.5) / mult&lt;br /&gt;
	if decimals &amp;lt; 0 then&lt;br /&gt;
		return tostring(num)&lt;br /&gt;
	else&lt;br /&gt;
		return string.format(&amp;#039;%.&amp;#039; .. decimals .. &amp;#039;f&amp;#039;, num)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args, pargs = frame.args, frame:getParent().args&lt;br /&gt;
	return p._main(mw.ext.ParserFunctions.expr(args[1] or pargs[1]), mw.ext.ParserFunctions.expr(args[2] or pargs[2]))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>