class Float
Public Instance Methods
is_0?()
click to toggle source
# File lib/m500.rb, line 453 def is_0? self === 0.0 ? true : false end
to_Dec()
click to toggle source
# File lib/m500.rb, line 483 def to_Dec re = /(\-*\d+).(\d+)e([-|+])(\d+)/ md = re.match(self.to_s) Decimal(md[1].to_i,md[2]) end
to_Frac()
click to toggle source
# File lib/m500.rb, line 466 def to_Frac Fraction(Zahlen(0), self.to_Q) end
to_K()
click to toggle source
# File lib/m500.rb, line 491 def to_K Kettenbruch(self.to_Frac) end
to_N()
click to toggle source
# File lib/m500.rb, line 456 def to_N t = emptySet t == Natural(self.truncate) if self.truncate == self.ceil t end
to_N0()
click to toggle source
# File lib/m500.rb, line 461 def to_N0 t = emptySet t == Counting(self.truncate) if self.truncate == self.ceil t end
to_Q()
click to toggle source
# File lib/m500.rb, line 469 def to_Q re = /^-/ md = re.match(self.to_s) e = -1 e = 1 if md.to_a.empty? md = nil re = /(\-*\d+).(\d+)e([-|+])(\d+)/ md = re.match(self.to_s) a = Quotient(md[1].to_i,1) b = Quotient(md[2].to_i,10 ** md[2].to_i.to_s.length) c = Quotient(1,10 ** md[4].to_i) if md[3] == "-" c = Quotient(10 ** md[4].to_i,1) if md[3] == "+" c*(b+(a*e)) end
to_R()
click to toggle source
# File lib/m500.rb, line 494 def to_R emptySet end
to_Sig()
click to toggle source
# File lib/m500.rb, line 488 def to_Sig Sigma(self.to_Q) end
to_Z()
click to toggle source
# File lib/m500.rb, line 446 def to_Z if self.to_i then Zahlen(self.to_i) else emptySet end end
to_sgml()
click to toggle source
# File lib/m500.rb, line 443 def to_sgml "<mn #{sgml_id}class='float'>#{self.to_s}</mn>" end