The absolute value of self.

assert((-3.to_r).abs == 3.to_r)
assert(3.to_r.abs == 3.to_r)

Property definitions

gmp $ Ratio :: abs
    # The absolute value of `self`.
    #
    #     assert((-3.to_r).abs == 3.to_r)
    #     assert(3.to_r.abs == 3.to_r)
    fun abs: Ratio do
        var res = new NativeMPQ
        val.abs res
        return new Ratio(res)
    end
lib/gmp/gmp.nit:355,5--363,7