The BigInt equivalent of self

Property definitions

gmp :: gmp $ Numeric :: to_bi
    # The BigInt equivalent of `self`
    fun to_bi: BigInt do return self.to_i.to_bi
lib/gmp/gmp.nit:22,5--23,47

gmp $ Ratio :: to_bi
    #     assert("7/2".to_r.to_bi == 3.to_bi)
    redef fun to_bi do
        var res = new NativeMPZ
        val.numref.tdiv_q(res, val.denref)
        return new BigInt(res)
    end
lib/gmp/gmp.nit:389,5--394,7

gmp :: gmp $ Float :: to_bi
    redef fun to_bi do
        var tmp = new NativeMPZ
        tmp.set_d self
        return new BigInt(tmp)
    end
lib/gmp/gmp.nit:93,5--97,7

gmp $ BigInt :: to_bi
    redef fun to_bi do return self
lib/gmp/gmp.nit:274,5--34

gmp :: gmp $ Int :: to_bi
    redef fun to_bi do
        var tmp = new NativeMPZ
        tmp.set_si self
        return new BigInt(tmp)
    end
lib/gmp/gmp.nit:107,5--111,7