View source for Module:Percentage
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
--
-- This module implements [[Template:Percentage]]
--
local p = {}
local math_module = require( "Module:Math" )
local precision = math_module._precision
local sortkey = require( "Module:Sortkey" )
local function rnd(num, digits)
-- This function implements {{rnd}}
return math_module._precision_format(tostring(num), digits)
end
local function oom(num)
-- This function implements {{order of magnitude}}
return math_module._order(tostring(num))
end
function _nonscinote(num)
-- This function undoes scientific notation
if mw.ustring.match(num or '', '^%s*(%d)%.(%d+)<span[^<>]*>×</span>10<sup>([%-−]*)(%d)</sup>%s*$') then
000
1:0
Template used on this page:
Return to Module:Percentage.