summaryrefslogtreecommitdiff
path: root/bignum.c
AgeCommit message (Collapse)Author
2007-12-04* bignum.c (rb_cstr_to_inum): trailing spaces may exist at sqeezingnobu
preceeding 0s. [ruby-core:13873] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-28* bignum.c (rb_big2str0): do not clobber space for sign.nobu
* sprintf.c (remove_sign_bits): extends sign bit first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-16* bignum.c (bigtrunc): RBIGNUM(x)->len may be zero. out of boundmatz
access. [ruby-dev:31404] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-16* bignum.c (big_lshift): make shift offset long type.akr
(big_rshift): ditto. (rb_big_lshift): ditto. (big_rshift): ditto. [ruby-dev:31434] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@13061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-30* bignum.c (rb_big_aref): check for Bignum index range.nobu
[ruby-dev:31271] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-19* bignum.c (rb_big_lshift, rb_big_rshift): separated functionsnobu
to get rid of infinite recursion. fixed calculation in edge cases. [ruby-dev:31244] * numeric.c (rb_fix_lshift, rb_fix_rshift): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-18* bignum.c (rb_big_pow): refine overflow check. [ruby-dev:31242]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-15* bignum.c (rb_big_pow): removed invariant variable. [ruby-dev:31236]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-15* bignum.c (rb_big_neg): SIGNED_VALUE isn't in 1.8.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-15* bignum.c (get2comp): do nothing for empty Bignum. [ruby-dev:31225]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-15* bignum.c (rb_cstr_to_inum): check leading non-digits.nobu
[ruby-core:11691] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-14* bignum.c (get2comp): do nothing for empty Bignum. [ruby-dev:31225]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-09* bignum.c: purged trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-09* bignum.c (Init_Bignum), numeric.c (Init_Numeric): added fdiv asnobu
aliases of quo. [ruby-dev:30771] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-09* bignum.c (rb_big_quo): now calculate in integer. [ruby-dev:30753]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-09* bignum.c (rb_big_pow): reduce multiplying for even number.nobu
* bignum.c (rb_big_pow): truncate all zero BDIGITs. [ruby-dev:30733] * bignum.c (rb_big_pow): improvement by calculating from MSB and using factorization. <http://yowaken.dip.jp/tdiary/20070426.html#p01> * numeric.c (int_pow): calculate power in Fixnum as possible. [ruby-dev:30726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-21* bignum.c (rb_big2str0): round up for the most significant digit.nobu
[ruby-core:10686] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-11-24* bignum.c (bignorm): avoid segmentation. a patch from Hiroyukimatz
Ito <ZXB01226@nifty.com>. [ruby-list:43012] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-30* bignum.c (rb_big2str0): use better approximation.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-30* bignum.c (rb_big2str0): wrong allocation length.matz
[ruby-dev:29710] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-30* bignum.c (rb_big2str0): a bug in length adjustment.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-30* sprintf.c (rb_str_format): should preserve leading zeromatz
information for negative %b and %x. [ruby-talk:221347] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-07* bignum.c (rb_big_rshift): a bug in right shift of negativematz
bignums. [ruby-core:09020] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-09* bignum.c (rb_big_mul0): bignum multiplication withoutmatz
normalization. * bignum.c (rb_big_pow): use rb_big_mul0(). [ruby-dev:29547] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-07* numeric.c (fix_plus): addition in Fixnum will never overflowmatz
long. a patch from Ondrej Bilka <neleai at seznam.cz>. [ruby-core:08794] * numeric.c (fix_minus): ditto. * bignum.c (rb_big_pow): eagerly truncate resulting bignum. [ruby-core:08794] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-04-09* prec.c (prec_prec_f): documentation patch frommatz
<gerardo.santana at gmail.com>. [ruby-core:07689] * bignum.c (rb_big_pow): second operand may be too big even if it's a Fixnum. [ruby-talk:187984] * README.EXT: update symbol description. [ruby-talk:188104] * COPYING: explicitly note GPLv2. [ruby-talk:187922] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-16* bignum.c (rb_big_rshift): fix a GC problem onakr
IA64 with gcc 4.0.3 20051216 (prerelease). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-21* bignum.c (bignew_1): convertion from `int' to `char' discardsocean
upper bits, (ie. (char)0xff00 -> 0) so it's better to test if nonzero and set 0 or 1 instead of simply casting ... as a flag usage. (but I believe this won't cause actual bug in current implementation) [ruby-dev:27055] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-06* Makefile.in, configure.in (MINIOBJS): miniruby on HP-UX can not loadnobu
extension libraries. * bignum.c (bignew_1, bigadd): K&R style argument actually can't be defined as char. * missing/vsnprintf.c: ANSI compiler supports const keyword. * ext/digest/sha2/extconf.rb: reject platforms which has inttypes.h but no 64bit integer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-10* bignum.c (rb_big_coerce): allow bignum x bignum coercing.matz
[ruby-dev:26778] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-22* bignum.c (rb_big_eq): reduce isnan(). [ruby-dev:26600]matz
* numeric.c (flo_eq, flo_gt, flo_ge, flo_lt, flo_le): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-01* bignum.c (get2comp): revert all prior changes, and calculatematz
proper 2's complement for negative numbers. backported from HEAD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-08* bignum.c (get2comp): calculate proper 2's complement formatz
negative numbers. a bug in normalizing negative numbers reported from Honda Hiroki <hhonda@ipflex.com>. * ext/socket/socket.c (ruby_getaddrinfo__aix): merged a patch from KUBO Takehiro <kubo@jiubao.org> to support AIX. [ruby-list:40832] * lib/yaml/rubytypes.rb (Array::to_yaml): merged a patch from Tilman Sauerbeck <tilman@code-monkey.de>. [ruby-core:05055] * lib/yaml/rubytypes.rb (Hash::to_yaml): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-28* exception error messages updated. [ruby-core:04497]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-06* bignum.c (rb_big2ulong_pack): One too many arguments are passedknu
to big2ulong(). * re.c (_reg_init_copy, rb_reg_initialize_m): One too many arguments are passed to rb_reg_initialize(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-04* bignum.c (rb_big_rand): should return positive random number.matz
[ruby-dev:25401] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-04* bignum.c (rb_big_rand): should return positive random number.matz
[ruby-dev:25401] * bignum.c (rb_big_rand): do not use rb_big_modulo to generate random bignums. [ruby-dev:25396] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-16* pack.c: all features are backport from 1.9. [ruby-dev:24826]gotoyuzo
* bignum.c (rb_big2ulong_pack): new function to pack Bignums. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-03* struct.c (make_struct): remove redefining constant whenmatz
conflict. [ruby-dev:24210] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-28* bignum.c (rb_big_and): protect parameters from GC.matz
[ruby-talk:110664] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-04* io.c (rb_io_gets_m): set lastline ($_) even when read line ismatz
nil. [ruby-dev:23663] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-07* eval.c (rb_eval): too many line trace call. (ruby-bugs PR#1320)matz
* numeric.c (flo_to_s): tweak output string based to preserve decimal point and to remove trailing zeros. [ruby-talk:97891] * string.c (rb_str_index_m): use unsigned comparison for T_FIXNUM search. [ruby-talk:97342] * hash.c (rb_hash_equal): returns true if two hashes have same set of key-value set. [ruby-talk:97559] * hash.c (rb_hash_eql): returns true if two hashes are equal and have same default values. * string.c (rb_str_equal): always returns true or false, never returns nil. [ruby-dev:23404] * io.c (rb_io_reopen): should use rb_io_check_io(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-05* eval.c (top_include): include in the wrapped load is done formatz
the wrapper, not for a singleton class for wrapped main. [ruby-dev:23305] * bignum.c (rb_big_eq): use temporary double variable to save the result (internal float register may be bigger than 64 bits, for example, 80 bits on x86). [ruby-dev:23311] * eval.c (block_pass): should generate unique identifier of the pushing block. [ruby-talk:96363] * ext/socket/socket.c (make_hostent): fix memory leak, based on the patch from HORIKAWA Hisashi <vzw00011@nifty.ne.jp>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-15* eval.c (rb_yield_0): should not re-submit TAG_BREAK if thismatz
yield is not break destination. [ruby-dev:23197] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-29Add RDoc for Kernel global functions, tidy array and errordave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-26* io.c (next_argv): warn always for stdin on inplace edit mode.matz
* io.c (read_all): need to check string value. * io.c (argf_read): allow ARGF.read(nil). [ruby-dev:22433] * io.c (rb_f_backquote): need not to check nil result. [ruby-core:02078] * io.c (rb_io_getline): should return nil when read_all gives empty string, even when nil rs is specified. [ruby-core:02077] * pack.c (pack_pack): add sign check for 'i', and 'l'. [ruby-dev:22427] * bignum.c (rb_quad_pack): add range check for 'quad int'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-22* configure.in (ac_cv_func_setitimer): moved from defines.hnobu
* defines.h, rubysig.h, signal.c: removed macro handling which should be done in configure. * configure.in (intrinsics.h): check if present. * ruby.h: include intrinsics.h if available. * bignum.c, marshal.c: include ieeefp.h if available. * missing.h (isinf): define as a macro if finite() and isnan() are available. [ruby-core:02032] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-19Add boot_classes to rdoc parsing, fix a couple of bugsdave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-19Fix dependency issuedave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-09* marshal.c (r_object0): remove unnecessary iv restoration formatz
USRMARSHAL. [ruby-dev:21582] * marshal.c (w_object): dump generic instance variables from a string from '_dump'. * variable.c (rb_generic_ivar_table): return 0 if obj's FL_EXIVAR is not set. * time.c (time_dump): copy instance variables to dumped string, to be included in the marshaled data. * bignum.c (rb_big2ulong): add range check to ensure round trip. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e