core :: Numeric :: to_r
self
# The Ratio equivalent of `self` fun to_r: Ratio do return self.to_f.to_r
redef fun to_r do return self
redef fun to_r do var tmp = new NativeMPQ tmp.set_d self return new Ratio(tmp) end
# assert(123.to_bi.to_r == 123.to_r) redef fun to_r do var tmp = new NativeMPQ tmp.set_z val return new Ratio(tmp) end
redef fun to_r do var tmp = new NativeMPQ tmp.set_si(self, 1) return new Ratio(tmp) end