Module:Rational: Difference between revisions

Plumtree (talk | contribs)
m factorisation() implemented
Plumtree (talk | contribs)
mNo edit summary
Line 760: Line 760:
a = p.new(a)
a = p.new(a)
end
end
if a.nan then return 'NaN' end
if a.nan or a.inf or a.zero then
if a.inf then
return 'n/a'
local sign = '+'
if a.sign < 0 then
sign = '-'
end
return sign .. ''
end
end
if a.zero then return '0' end
local s = ''
local s = ''
if a.sign < 0 then
if a.sign < 0 then