跳转到内容

模組:Complex Number/Solver

本页使用了标题或全文手工转换
被永久保护的模块
维基百科,自由的百科全书

这是本页的一个历史版本,由A2569875留言 | 贡献2022年4月19日 (二) 10:38 建立内容为“local p = {} function p._trunc(x,n) local _10_n = math.pow(10,n) local _10_n_x = _10_n * x return (x >= 0)and(math.floor(_10_n_x) / _10_n)or(math.ceil(_10_n_x) / _10_n) end function p._numberType(input_num) if type(input_num) == type(0) then return "real" elseif type(input_num) == type({}) then return input_num.numberType or "nan" else return "nan" end end function p._isNaN(x) return (not (x==x)) and (x~=x) end return p”的新页面)编辑。这可能和当前版本存在着巨大的差异。

(差异) ←上一修订 | 最后版本 (差异) | 下一修订→ (差异)

local p = {}
function p._trunc(x,n) 
	local _10_n = math.pow(10,n)
	local _10_n_x = _10_n * x
	return (x >= 0)and(math.floor(_10_n_x) / _10_n)or(math.ceil(_10_n_x) / _10_n)
end
function p._numberType(input_num) 
	if type(input_num) == type(0) then
		return "real"
	elseif type(input_num) == type({}) then
		return input_num.numberType or "nan"
	else
		return "nan"
	end
end
function p._isNaN(x)
	return (not (x==x)) and (x~=x)
end
return p