# File basiclibrary.rb, line 364 def round_to(decimals) if self<0 then s='-'; x=-self; else s=''; x=self; end if x>=1.0e15 then m=x.to_s; else m=(x*10**decimals).round.to_s if (decimals!=0) then k=m.length; if k<=decimals then z='000000000000000'[0..(decimals-k)] m=z+m; k=decimals+1; end m.insert(k-decimals,'.'); end end s='' if (/^0\.0*$/=~m); s+m; end