Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
Module:Stat
(view source)
Revision as of 08:15, 12 October 2015
18 bytes added
,
9 years ago
no edit summary
Line 19:
Line 19:
local q = tonumber(frame.args[3])
local q = tonumber(frame.args[3])
if a and b and q then
if a and b and q then
−
return string.format("%.f", log(1 - q) / log(1 - a / b))
+
return string.format("%.f", log(1 - q
/ 100
) / log(1 - a / b))
else
else
return "undefined"
return "undefined"
Line 33:
Line 33:
local p = a / b
local p = a / b
local se = math.sqrt(p * (1 - p) / b)
local se = math.sqrt(p * (1 - p) / b)
−
return string.format("%." .. f .. "f", 100 * pc * se)
+
return string.format("%." .. f .. "f", 100 *
(
pc * se
+ 0.5 / b)
)
else
else
return "undefined"
return "undefined"
がか
cssedit, gkautomate
7,064
edits