Module:Infobox interval: Difference between revisions

Move the "p-limit" category to "p-limit intervals"
Fix categorizing irregular intervals as rational
Line 90: Line 90:
end
end
-- categorize by rationality and prime limit
if rational then
if regular then
cats = cats .. '[[Category:Rational intervals]]'
if rational then
else
local prime_limit = 2
cats = cats .. '[[Category:Irrational intervals]]'
if not rat.eq(ratio, 1) then
end
prime_limit = rat.max_prime(ratio)
if regular and rational then
end
local prime_limit = 2
cats = cats .. '[[Category:Rational intervals]]' .. '[[Category:' .. prime_limit .. '-limit intervals]]'
if not rat.eq(ratio, 1) then
else
prime_limit = rat.max_prime(ratio)
cats = cats .. '[[Category:Irrational intervals]]'
end
end
cats = cats .. '[[Category:' .. prime_limit .. '-limit intervals]]'
end
end
 
local special_properties = {}
local special_properties = {}
if rational and small then
if rational and small then