As stated in Bug #17214 (https://bugs.ruby-lang.org/issues/17214) when exponentiating a BigDdecimal number even when using small numbers, a precision argument must be passed to the operation or the operation will return wrong result, 222...karatedog (Földes László)
If I increase the precision of the two arguments ("2222", "3.5"), but leave the operation's precision on default, the result still will be wrong. ``` ruby (BigDecimal("2222",10000) ** BigDecimal("3.5",10000)).to_i # => 517135311000 ``` T...karatedog (Földes László)
This is an incorrect value: ```ruby (BigDecimal("2222") ** BigDecimal("3.5")).to_i # => 517135311000 ``` This is the correct value (within Float precision): ```ruby 2222 ** 3.5 # => 517135308457.25256 ``` As the Base ge...karatedog (Földes László)
That is the same problem as here: https://bugs.ruby-lang.org/issues/8826 #/ is the same method as #quo (according to documentation both methods are defined in 'bigdecimal.c' at line 1281). Currently you can divide a bigdecimal by using ...karatedog (Földes László)
BigDecimal's #div and #quo method behave differently despite the #div documentation says: "See BigDecimal#quo" #div returns Fixnum if there is no precision argument for #div (this parameter is not documented): ``` 2.0.0-p247 :018 ...karatedog (Földes László)