ruby-changes:29162
From: akr <ko1@a...>
Date: Mon, 10 Jun 2013 19:55:17 +0900 (JST)
Subject: [ruby-changes:29162] akr:r41214 (trunk): Update doc.
akr 2013-06-10 19:55:08 +0900 (Mon, 10 Jun 2013) New Revision: 41214 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41214 Log: Update doc. Modified files: trunk/bignum.c Index: bignum.c =================================================================== --- bignum.c (revision 41213) +++ bignum.c (revision 41214) @@ -843,6 +843,9 @@ integer_pack_take_lowbits(int n, BDIGIT_ https://github.com/ruby/ruby/blob/trunk/bignum.c#L843 /* * Export an integer into a buffer. * + * This function fills the buffer specified by _words_ and _numwords_ as + * abs(val) in the format specified by _wordsize_, _nails_ and _flags_. + * * [val] Fixnum, Bignum or another integer like object which has to_int method. * [words] buffer to export abs(val). * [numwords] the size of given buffer as number of words. @@ -853,11 +856,13 @@ integer_pack_take_lowbits(int n, BDIGIT_ https://github.com/ruby/ruby/blob/trunk/bignum.c#L856 * It specifies word order and byte order. * * This function returns the signedness and overflow condition as follows: - * -2 : negative overflow. - * -1 : negative without overflow. - * 0 : zero. - * 1 : positive without overflow. - * 2 : positive overflow. + * -2 : negative overflow. val <= -2**(numwords*(wordsize*CHAR_BIT-nails)) + * -1 : negative without overflow. -2**(numwords*(wordsize*CHAR_BIT-nails)) < val < 0 + * 0 : zero. val == 0 + * 1 : positive without overflow. 0 < val < 2**(numwords*(wordsize*CHAR_BIT-nails)) + * 2 : positive overflow. 2**(numwords*(wordsize*CHAR_BIT-nails)) <= val + * + * The least significant words of abs(val) are filled in the buffer when overflow occur. */ int -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/