| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bignum.c: rdoc for <=>
* file.c: ditto
* time.c: ditto
* compar.c: rdoc
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
multiply two single digit bignums.
(bigmul0): use bigmul1_single.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
optimization.
* bignum.c (big2dbl): truncates zero digits to get rid of possible
underflow.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* bignum.c (rb_big_pow): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
definition of (classes)#=== for case/when optimization.
Fix Bug #1376 [ruby-core:23190].
* string.c (Init_String), bignum.c (Init_Bignum),
numeric.c (Init_Numeric): define String#===, Symbol#===,
Bignum#===, Fixnum#===, Float#=== as same as (classes)#==.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
bigmul1_balance, big_split): remove BDIGITS() inside of the loops.
same as r24444.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
loop. inspired by Hitohiro Kanai's blog entry
<http://d.hatena.ne.jp/CanI/20090807/1249657492>.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
added for random.c.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
normalization. [ruby-dev:38679]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
number. [ruby-dev:38672]
* bignum.c (rb_big_cmp): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
can be converted to float properly.
* numeric.c (fix_fdiv): calls rb_big_fdiv when the given second
argument is a bignum.
* rational.c (nurat_fdiv): should calculate Float(x/y), not
Float(x)/Float(y).
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
-HUGE_VAL (-Infinity).
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
fixnum without allocating internal bignum.
* bignum.c (bigor_int): ditto.
* bignum.c (bigxor_int): ditto.
* bignum.c (bigand_int): even less object allocation.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
* bignum.c, marshal.c: fixed types.
* numeric.c (infinite_value): use ruby_div0.
* include/ruby/util.h (ruby_div0): moved from marshal.c.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* bignum.c (bigtrunc): call rb_big_resize() only when needed.
* bignum.c (bigfixize): declare inline.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
bignum values.
* bignum.c (bigadd_int): ditto for addition.
* bignum.c (bigtrunc): declare inline.
* bignum.c (rb_quad_pack): fix condition.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
numeric.c, pack.c, strftime.c, string.c, thread.c, transcode.c,
transcode_data.h, util.c, variable.c, vm_dump.c,
include/ruby/encoding.h, missing/crypt.c, missing/vsnprintf.c:
suppress VC type warnings. [ruby-core:22726]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
missing/crypt.c, missing/vsnprintf.c, : suppress warnings.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
* complex.c (string_to_c_strict): ditto.
* rational.c (string_to_r_strict): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
* bignum.c (bigsqr): call bigmul0(x, x) because it is faster than the
original bigsqr at this point.
* bignum.c (rb_big_pow): a value returned from bigsqr is already
truncated.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
rb_gc_force_recycle which causes memory leak.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
twice faster square than normal multiplication.
* random.c (rb_rand_internal): used by Bignum#*.
* test/ruby/test_bignum.rb: add some tests for above.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* rational.c: ditto.
* bignum.c (rb_big_pow): bignum**bignum - should calculate without
rational.
* lib/complex.rb: should override Math module at most once.
* lib/mathn.rb: requires 'cmath' directly.
-この行以下は無視されます --
M complex.c
M ChangeLog
M lib/mathn.rb
M lib/complex.rb
M bignum.c
M rational.c
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
a patch from TOYOFUKU Chikanobu <nobu_toyofuku at nifty.com>
in [ruby-dev:36217].
* bignum.c (rb_big2str0): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to rb_gc_register_mark_object().
* eval.c, vm.c: initialize vm->mark_object_ary at
Init_top_self().
* bignum.c, complex.c, encoding.c, ext/win32ole/win32ole.c,
io.c, load.c, marshal.c, rational.c, ruby.c, vm.c:
use rb_gc_register_mark_object() instead of
rb_global_variable() or rb_gc_register_address().
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
a patch from TOYOFUKU Chikanobu <nobu_toyofuku at nifty.com> in
[ruby-dev:36231].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
patch from TOYOFUKU Chikanobu <nobu_toyofuku at nifty.com> in
[ruby-dev:36217].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
tail of digits. a patch from TOYOFUKU Chikanobu
<nobu_toyofuku at nifty.com> in [ruby-dev:36169].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
a patch from Tadashi Saito <shiba at mail2.accsnet.ne.jp>
in [ruby-dev:36102].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
TOYOFUKU Chikanobu <nobu_toyofuku at nifty.com> in [ruby-dev:36044].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
enumerator.c (enumerator_allocate), eval_jump.c, file.c, hash.c,
io.c, load.c, pack.c, proc.c, random.c, re.c, ruby.c, st.c,
string.c, thread.c, thread_pthread.c, time.c, util.c, variable.c,
vm.c, gc.c:
allocated memory objects by xmalloc (ruby_xmalloc) should be
freed by xfree (ruby_xfree).
* ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c,
ext/gdbm/gdbm.c, ext/json/ext/parser/parser.c,
ext/json/ext/parser/unicode.c, ext/openssl/ossl_cipher.c,
ext/openssl/ossl_hmac.c, ext/openssl/ossl_pkey_ec.c,
ext/sdbm/init.c, ext/strscan/strscan.c, ext/zlib/zlib.c:
ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
values. [ruby-dev:34612]
* bignum.c (rb_big_or): ditto.
* bignum.c (rb_big_xor): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* numeric.c (num_quo): renamed and moved from bignum.c.
[ruby-dev:34582]
* bignum.c (rb_big_fdiv): update RDoc description
* rational.c (nurat_s_new_m): small refactoring.
* bignum.c (rb_big2dbl): no need for forceful warning when
converting to float. overflow is a nature of float values.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
domain. [ruby-dev:34559]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
[ruby-dev:34553]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|