summaryrefslogtreecommitdiff
path: root/ext/bigdecimal
AgeCommit message (Collapse)Author
2010-08-28* ext/bigdecimal/bigdecimal.c (BigDecimal_save_exception_mode,mrkn
BigDecimal_save_rounding_mode, BigDecimal_save_limit): added. * test/bigdecimal/test_bigdecimal.rb: added tests for the above features. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-26* ext/bigdecimal/bigdecimal.c (Init_bigdecimal, ↵mrkn
rmpd_set_thread_local_exception_mode, VpGetException, VpSetException): thread-local exception mode. * ext/bigdecimal/bigdecimal.c (Init_bigdecimal, rmpd_set_thread_local_precision_limit, VpGetPrecLimit, VpSetPrecLimit): thread-local precision limit. * ext/bigdecimal/bigdecimal.c (Init_bigdecimal, rmpd_set_thread_local_rounding_mode, VpGetRoundMode, VpSetRoundMode, VpException, VpInternalRound): thread-local rounding mode. * ext/bigdecimal/bigdecimal.c (BigDecimal_mode, BigDecimal_round, VpIsRoundMode, VpGetRoundMode, VpSetRoundMode, VpActiveRound, VpMidRound, VpLeftRound), ext/bigdecimal/bigdecimal.h: use unsigned short for rounding mode. * test/bigdecimal/test_bigdecimal.rb (test_mode): add test for setting rounding mode. * test/bigdecimal/test_bigdecimal.rb (test_thread_local_mode): add test for setting mode thread-locally. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-23* ext/bigdecimal/bigdecimal.c (BigDecimal_to_f): to_f must underflow when ↵mrkn
the exponent is less than DBL_MIN_10_EXP - BASE_FIG. * test/bigdecimal/test_bigdecimal.rb (test_to_f): added test for the above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16* ext/bigdecimal/bigdecimal.h (llabs): never never never never neverusa
use "long long". * ext/bigdecimal.bigdecimal.c (BigDecimal_to_i): get rid of a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-15* ext/bigdecimal/bigdecimal.c (BigDecimal_dump, BigDecimal_inspect, VPrint, ↵mrkn
VpToString, VpVarCheck): use PRIuSIZE, PRIdSIZE, PRIdVALUE, and PRIxVALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-15* ext/bigdecimal/bigdecimal.h (VpVtoD): fix a type of e.mrkn
* ext/bigdecimal/bigdecimal.c (BigDecimal_dump, BigDecimal_inspect): fix format for size_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* ext/bigdecimal/extconf.rb, ext/bigdecimal/bigdecimal.h (labs, llabs): ↵mrkn
support environments missing labs and llabs. * ext/bigdecimal/bigdecimal.h (vabs): added. * ext/bigdecimal/extconf.rb, ext/bigdecimal/bigdecimal.h, ext/bigdecimal/bigdecimal.c, test/bigdecimal/test_bigdecimal.rb (TestBigDecimal#test_new): replace U_LONG, S_LONG, S_INT, and U_INT with appropreate standard or ruby-provided types. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11* ext/bigdecimal/bigdecimal.c: don't use // comment.mrkn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-10* ext/bigdecimal/bigdecimal.c, ext/bigdecimal/bigdecimal.h, ↵mrkn
ext/bigdecimal/extconf.rb: BASE and BASE_FIG are defined based on the size of BDIGIT and renamed. * ext/bigdecimal/bigdecimal.c, ext/bigdecimal/bigdecimal.h: use BDIGIT for Real#frac. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-10* ext/bigdecimal/bigdecimal.h, ext/bigdecimal/bigdecimal.c: add extern ↵mrkn
declaration of rb_cBigDecimal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07.cvsignore: have not been used already. [Bug #3468]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-02* ext/bigdecimal/bigdecimal.c (BigDecimal_hash): fix type warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-01* ext/bigdecimal/bigdecimal.c (BigDecimal_hash): use rb_memhash and take ↵mrkn
care of negative finite numbers properly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-18* include/ruby/ruby.h (rb_data_type_t): restructured. [ruby-dev:41862]nobu
add parent member. * error.c (rb_typeddata_inherited_p): new function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-03* ext/bigdecimal/bigdecimal.c (Init_bigdecimal): add two new constants ↵mrkn
BigDecimal::INFINITY and BigDecimal::NAN. * ext/bigdecimal/lib/bigdecimal/math.rb (BigMath.exp): modify the behaviors for infinity arguments as same as Math.exp. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-12* ext/bigdecimal/lib/bigdecimal/math.rb (BigMath#log): improvednobu
precision and performance. [ruby-dev:41295] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-11* ext/bigdecimal/lib/bigdecimal/math.rb (atan), ↵mrkn
test/bigdecimal/test_bigmath.rb (test_atan): explicitly specify the precision for calculating a reciprocal number of an argument. [Bug #3267] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-08* ext/bigdecimal/bigdecimal.c (VpAlloc): ensure buf does not getnobu
collected. based on a patch masaya tarui at [ruby-dev:41213]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-06* ext/bigdecimal/bigdecimal.c (VpCtoV): fix to check overflow.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-01* ext/bigdecimal/bigdecimal.c (BigDecimal_IsInfinite): don't usenobu
non-ascii character. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-28* ext/bigdecimal: fixed types.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-26* ext/bigdecimal/bigdecimal.def: unnecessary.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-26* ext/bigdecimal/bigdecimal.c: suppressed warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22* ext/**/*.[ch]: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-21* ext/bigdecimal/bigdecimal.[ch]: replace _DEBUG with BIGDECIMAL_DEBUG to ↵mrkn
prevent activating debugging code when compiled with -DEBUG flag on Windows. [ruby-core:22989] #1308 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-16* ext/bigdecimal/bigdecimal.c (BigDecimal_coerce): revert r23389,mame
which not only is unnecessary but also causes the inconsistency of return type. [ruby-core:25706] [Bug #2129] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-17* ext/bigdecimal/bigdecimal.c (BigDecimal_{to_i,mod,divmod,div2}):nobu
removed unused variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-16* ext/bigdecimal/bigdecimal.c (VpCtoV): keep e's sign.naruse
When e doesn't over flow e * BASE_FIG but overflow e * 10, e will overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-09* ext/bigdecimal/bigdecimal.c (BigDecimal_divide): fix precision too.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-09* ext/bigdecimal/bigdecimal.c (BigDecimal_DoDivmod): fix precision.mame
[ruby-core:17472][ruby-dev:35372][ruby-dev:40105][ruby-dev:40358] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-03* ext/bigdecimal/bigdecimal.c (BigDecimal_DoDivmod): get red ofmame
floating point exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-03* ext/bigdecimal/bigdecimal.c (BigDecimal_DoDivmod): fix infinitymame
handling. 1 / Infinity was evaluated to NaN. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-28* ext/bigdecimal/bigdecimal.c (BigDecimal_to_i): update RDoc tomatz
denote that #to_i raises FloatDomainError for Inf and NaN. * ext/bigdecimal/bigdecimal.c (BigDecimal_to_i): fast #to_i using BigDecimal_split(). * bignum.c (conv_digit): use faster ISDIGIT() assuming ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-26* ext/bigdecimal/bigdecimal.c (BigDecimal_DoDivmod, BigDecimal_mod,mame
BigDecimal_divmod, BigDecimal_div2): BigDecimal#% and #div returned an array itself that was returned by #divmod. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-26* ext/bigdecimal/bigdecimal.c (VpCtoV): do not raise infinitymame
exception for BigDecimal("0E200000000000"). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-26* ext/bigdecimal/bigdecimal.c (VpCtoV): BigDecimal("0E200000000000")mame
was Infinity, not 0. * test/bigdecimal/test_bigdecimal.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-06ext/bigdecimal/bigdecimal_en.html: Remove obsolete information, fix typosmarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-14* ext/bigdecimal/bigdecimal.c (BigDecimalCmp): Fix comparisons [ruby-core:26646]marcandre
* test/bigdecimal/test_bigdecimal.rb (class): Fix and improve tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-09* string.c (rb_str_each_line): rdoc fixmarcandre
* ext/bigdecimal/bigdecimal.c (#infinite?, #nonzero?): rdoc fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-01* ext/bigdecimal/bigdecimal.c: fixed rdoc. [ruby-core:26457]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-16* ext/bigdecimal/bigdecimal.c (VpMidRound): remove warnings.naruse
patch from Charlie Savage. [ruby-core:22869] * ext/digest/bubblebabble/bubblebabble.c (bubblebabble_str_new): ditto. * ext/digest/digest.c (hexencode_str_new): ditto. * ext/iconv/iconv.c (iconv_convert): ditto. * ext/socket/socket.c (inspect_sockaddr): ditto. * ext/socket/raddrinfo.c (sockaddr_obj): ditto. * ext/syck/emitter.c (syck_emitter_write): ditto. * ext/syck/emitter.c (syck_emitter_flush): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-23* ext/bigdecimal/lib/bigdecimal/math.rb (atan): atan(Infinity) isnobu
PI/2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-23* ext/bigdecimal/lib/bigdecimal/math.rb (atan): reduce loop withnobu
the formula of the double corner. based on a patch from Masahiro Kanai (CanI) in [ruby-dev:39367]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-23* ext/bigdecimal/lib/bigdecimal/math.rb (atan): refined.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-21* ext/bigdecimal/lib/bigdecimal/{ludcmp,math}.rb: depend onnobu
bigdecimal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-21* ext/bigdecimal/lib/bigdecimal/newton.rb: rdoc needs to benobu
followed by the definition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-21* ext/bigdecimal/lib/bigdecimal/*.rb: made module functions.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-21* ext/bigdecimal/lib/*.rb: fixed indent.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-21* ext/bigdecimal/bigdecimal.c (GetVpValue): support conversion fromnobu
Rational. [ruby-core:25697] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-21* ext/bigdecimal/bigdecimal.c (BigDecimal_remainder): Doc fix [ruby-core:18796]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e