Modul:Math: Unterschied zwischen den Versionen
can't work due to prehandling by #expr, simplify
(problem with lost precision) |
(can't work due to prehandling by #expr, simplify) |
||
Zeile 109: | Zeile 109: | ||
local lang = mw.getContentLanguage(); | local lang = mw.getContentLanguage(); | ||
local | local value = tonumber( frame.args[1] or 0 ); | ||
local precision = tonumber( frame.args[2] or 0 ); | local precision = tonumber( frame.args[2] or 0 ); | ||
local current_precision = z._precision( value ); | local current_precision = z._precision( value ); | ||
Zeile 119: | Zeile 118: | ||
-- some circumstances because the terminal digits will be inaccurately reported. | -- some circumstances because the terminal digits will be inaccurately reported. | ||
if order + precision >= 14 then | if order + precision >= 14 then | ||
precision = 13 - order; | |||
end | end | ||