Kenta Murata

Results 83 issues of Kenta Murata

The `pivot` collects the result arrays of the given block, makes a hash that is made by grouping the item in the result arrays by its first items, then aggregates...

enhancement
help wanted

`BigDecimal::INFINITY.round` shouldn't cause `FloatDomainError` when `BigDecimal.mode(BigDecimal::EXCEPTION_INFINITY) == 0` but it raises the error. ``` $ ruby -rbigdecimal -e "BigDecimal.mode(BigDecimal::EXCEPTION_INFINITY, false); BigDecimal::INFINITY.round" -e:1:in `round': Computation results in 'Infinity' (FloatDomainError) from -e:1:in...

[Bug [#18677](https://bugs.ruby-lang.org/issues/18677)]

``` irb(main):002:0> BigDecimal(5.1) (irb):2:in `BigDecimal': can't omit precision for a Float. (ArgumentError) from (irb):2:in `' from /home/mrkn/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/irb-1.3.8.pre.9/exe/irb:11:in `' from /home/mrkn/.rbenv/versions/3.0/bin/irb:23:in `load' from /home/mrkn/.rbenv/versions/3.0/bin/irb:23:in `' ``` This should works like below....

Some tests fail when `DECDIG` is `uint16_t`. ``` Failure: test_BigDecimal(TestBigDecimal): Expected 0.1e1111111111111111112 to be positive infinite. is not true. /home/mrkn/src/github.com/ruby/bigdecimal/test/lib/core_assertions.rb:504:in `assert' /home/mrkn/src/github.com/ruby/bigdecimal/test/bigdecimal/test_bigdecimal.rb:47:in `assert_positive_infinite' /home/mrkn/src/github.com/ruby/bigdecimal/test/bigdecimal/test_bigdecimal.rb:86:in `block in test_BigDecimal' 83: BigDecimal.mode(BigDecimal::EXCEPTION_OVERFLOW, false)...

``` compiling bigdecimal.c "bits.h", line 67: warning: implicit function declaration: __builtin_clz ``` The compiler is sunc.

In the current implementation, these methods don't support integral exponent values whose internal types are `T_BIGNUM`.

enhancement

The original issue is https://bugs.ruby-lang.org/issues/3270 It can be optimized for the large argument by the following formula. ``` exp(a * b + c) = exp(a)**b * exp(c) ```

bug
enhancement

Original issue is https://bugs.ruby-lang.org/issues/3269.

enhancement