Module:Johnuniq/Testnum
Documentation for this module may be created at Module:Johnuniq/Testnum/doc
-- Investigate precision with which numbers are stored on server.
local p = {}
function p.show(frame)
local pframe = frame:getParent()
local numstr = pframe.args[1]
local numval = tonumber(numstr)
local text
if numval == nil then
if numstr == nil or numstr == '' then
text = 'Error: parameter missing'
else
text = 'Error: parameter not a number'
end
else
text = string.format('parm "%s" = %.30f', numstr, numval)
end
return text
end
return p