[#81999] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — ko1@...
Issue #13737 has been updated by ko1 (Koichi Sasada).
4 messages
2017/07/11
[#82005] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — nobu@...
Issue #13737 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/07/12
[#82102] Re: register_fstring_tainted:FL_TEST_RAW(str, RSTRING_FSTR) — Eric Wong <normalperson@...>
Koichi Sasada <ko1@atdot.net> wrote:
4 messages
2017/07/18
[#82151] [Ruby trunk Feature#13637] [PATCH] tool/runruby.rb: test with smallest possible machine stack — Rei.Odaira@...
Issue #13637 has been updated by ReiOdaira (Rei Odaira).
3 messages
2017/07/24
[ruby-core:82107] [Ruby trunk Bug#13754] bigdecimal with lower precision that Float
From:
lionel.perrin@...
Date:
2017-07-19 09:50:55 UTC
List:
ruby-core #82107
Issue #13754 has been reported by lionel_perrin (Lionel PERRIN).
----------------------------------------
Bug #13754: bigdecimal with lower precision that Float
https://bugs.ruby-lang.org/issues/13754
* Author: lionel_perrin (Lionel PERRIN)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.4.1p111 (2017-03-22 revision 58053) [x64-mingw32]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Hello,
I'm not sure if I've misunderstood the bigdecimal class but in the following example, I only get 12 significant digits using bigdecimal while using Float, I get a correct value with 17 significant digits.
~~~ ruby
# using floats
101/0.9163472602589686 # 110.22022368622177 (OK: floating point computation)
# using bigdecimal
a = BigDecimal('101'); a.precs # [9, 18]
b = BigDecimal('0.9163472602589686'); b.precs # [18, 27]
c = a/b; c.precs # [18, 36] (OK: I understand that c is computed with 18 significant digits)
c.to_s # "0.110220223686e3" (Mmm: I see only 12 significant digits)
c - BigDecimal('0.110220223686e3') # 0.0 (Looks like only 12 significant digits were kept c and not 18)
~~~
Using the Rational class, I've seen that the value I'm expecting is about: 110.2202236862217746799312
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>