bigdecimal
bigdecimal copied to clipboard
Arbitrary-precision decimal floating-point number library for Ruby
Doc for method BigDecimal says: * When arg is a Float and digits is 0, the number * of digits is determined by the algorithm of dtoa function * written...
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)...
I expected this to affect the significant digits if providing the first argument as a String, but it does not. I'm positive this argument is ignored if the first argument...
This shows the current gem version and link to the gem pages on rubygems.org and stdgems.org
Thank you for the version selection chart. However, I'm finding it confusing for our case where we are upgrading to Ruby2.7.x and Rails 6.0.x (a common and modern stack) Today,...
``` compiling bigdecimal.c "bits.h", line 67: warning: implicit function declaration: __builtin_clz ``` The compiler is sunc.
JRuby has its own bigdecimal library based on the JDK's built-in BigDecimal. We also do not support C extensions, which means this gem can't be installed at all on JRuby....
The `digits` parameter of Kernel#BigDecimal is documented like this: > The number of significant digits, as an Integer. If omitted or 0, the number of significant digits is determined from...
In the current implementation, these methods don't support integral exponent values whose internal types are `T_BIGNUM`.
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) ```