Module:Uniform map: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
Line 88: Line 88:
-- Generate table of p-limit uniform maps between min and max, for use with print_table
-- Generate table of p-limit uniform maps between min and max, for use with print_table
-- Could potentially be used standalone for raw data with headers
-- Could potentially be used standalone for raw data with headers
function p.make_table(prime, min, max)
function p.make_table(prime, prec, min, max)
local maptable = {} -- Table of uniform maps with boundaries and wart notation
local maptable = {} -- Table of uniform maps with boundaries and wart notation
local map_table = p.new()
local map_table = p.new()
Line 100: Line 100:
table.insert(maptable, row)
table.insert(maptable, row)
while lb < max do
while lb < max do
row = { string.format("%.4f", lb), string.format("%.4f", ub), p.wart(map_table.map) }
row = { string.format(string.format("%%.%df", tonumber(prec)), lb), string.format(string.format("%%.%df", tonumber(prec)), ub), p.wart(map_table.map) }
for j = 1, #map_table.map do
for j = 1, #map_table.map do
table.insert(row, map_table.map[j])
table.insert(row, map_table.map[j])
Line 119: Line 119:
local max = args["max"]
local max = args["max"]
local edo = args["edo"]
local edo = args["edo"]
local prec = args["prec"]
local debugg = yesno(args["debug"])
local debugg = yesno(args["debug"])


Line 138: Line 139:
end
end


local luatable = p.make_table(prime, min, max)
local luatable = p.make_table(prime, prec, min, max)
local result = '{| class="wikitable"\n'
local result = '{| class="wikitable"\n'
.. '|+ style="font-size: 105%; | '
.. '|+ style="font-size: 105%; | '