Sha256: 0e0ed7510d13d1c08932fd926e8f77cea8af44f51dc97dc54d50bddc8d378674

Contents?: true

Size: 1.92 KB

Versions: 12

Compression:

Stored size: 1.92 KB

Contents

o:$YARD::CodeObjects::MethodObject:@scope:
instance:@visibility:public:
@pathI"
Bignum#~:EF:@parameters[:@files[[I"
bignum.c;T0:@current_file_has_commentsF:
@name:~:@source_type:c:
@tags[:@docstringIC:YARD::Docstring"Inverts the bits in big. As Bignums are conceptually infinite
length, the result acts as if it had an infinite number of one
bits to the left. In hex representations, this is displayed
as two periods to the left of the digits.

  sprintf("%X", ~0x1122334455)    #=> "..FEEDDCCBBAA";F:@objectIu:YARD::StubProxy
Bignum#~;F:
@summary0:@ref_tags[;[o:YARD::Tags::OverloadTag
:@tag_nameI"
overload;F:
@text0;;:@types0:@signatureI"	~big;F;IC;";F;Iu;
Bignum#~;F;0;[;[o:YARD::Tags::Tag
;I"return;F;I";F;0;[I"Integer;F;0:	@allI"@return [Integer];F;[;Iu;
Bignum#~;F; I">Inverts the bits in big. As Bignums are conceptually infinite
length, the result acts as if it had an infinite number of one
bits to the left. In hex representations, this is displayed
as two periods to the left of the digits.

  sprintf("%X", ~0x1122334455)    #=> "..FEEDDCCBBAA"


@overload ~big
  @return [Integer];F:@namespaceIu;Bignum;F:@docstring_extra0:@sourceI"Ó/*
 * call-seq:
 *     ~big  ->  integer
 *
 * Inverts the bits in big. As Bignums are conceptually infinite
 * length, the result acts as if it had an infinite number of one
 * bits to the left. In hex representations, this is displayed
 * as two periods to the left of the digits.
 *
 *   sprintf("%X", ~0x1122334455)    #=> "..FEEDDCCBBAA"
 */

static VALUE
rb_big_neg(VALUE x)
{
    VALUE z = rb_big_clone(x);
    BDIGIT *ds;
    long i;

    if (!RBIGNUM_SIGN(x)) get2comp(z);
    ds = BDIGITS(z);
    i = RBIGNUM_LEN(x);
    if (!i) return INT2FIX(~(SIGNED_VALUE)0);
    while (i--) {
    ds[i] = ~ds[i];
    }
    RBIGNUM_SET_SIGN(z, !RBIGNUM_SIGN(z));
    if (RBIGNUM_SIGN(x)) get2comp(z);

    return bignorm(z);
};F

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
pry-doc-0.4.4 lib/pry-doc/core_docs_19/objects/Bignum/_7E_i.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_19/objects/Bignum/_7E_i.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_19/objects/Bignum/_7E_i.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_19/objects/Bignum/_7E_i.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_19/objects/Bignum/_7E_i.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_19/objects/Bignum/_7E_i.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_19/objects/Bignum/_7E_i.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_19/objects/Bignum/_7E_i.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_19/objects/Bignum/_7E_i.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_19/objects/Bignum/_7E_i.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_19/objects/Bignum/_7E_i.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_19/objects/Bignum/_7E_i.dat