[#61822] Plan Developers Meeting Japan April 2014 — Zachary Scott <e@...>

I would like to request developers meeting around April 17 or 18 in this mo=

14 messages 2014/04/03
[#61825] Re: Plan Developers Meeting Japan April 2014 — Urabe Shyouhei <shyouhei@...> 2014/04/03

It's good if we have a meeting then.

[#61826] Re: Plan Developers Meeting Japan April 2014 — Zachary Scott <e@...> 2014/04/03

Regarding openssl issues, I=E2=80=99ve discussed possible meeting time with=

[#61833] Re: Plan Developers Meeting Japan April 2014 — Martin Bo煬et <martin.bosslet@...> 2014/04/03

Hi,

[ruby-core:61788] [ruby-trunk - Bug #9689] [Open] (BigDecimal + Float) no longer commutative due to #7176

From: saurik@...
Date: 2014-04-01 05:12:35 UTC
List: ruby-core #61788
Issue #9689 has been reported by Jay Freeman.

----------------------------------------
Bug #9689: (BigDecimal + Float) no longer commutative due to #7176
https://bugs.ruby-lang.org/issues/9689

* Author: Jay Freeman
* Status: Open
* Priority: Low
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.0.0p299 (2013-08-29) [x86_64-linux-gnu]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
So, there was a bug filed a while back (#7176) about Rational + BigDecimal failing, despite BigDecimal + Rational working.

https://bugs.ruby-lang.org/issues/7176

When this bug was fixed (in r37406), the new BigDecimal#+ also (I believe unnecessarily) converts Float to BigDecimal, making BigDecimal + Float return a BigDecimal despite Float + BigDecimal returning a Float. Given that work was put in to make BigDecimal + Rational commutative it seems like the same behavior should be in place for BigDecimal + Float: preferably, either both should be commutative, or neither should be commutative. (Please understand that I filed this as a "Bug", as this seems like a regression from the earlier behavior, but I would not at all quibble if someone decided that this should actually be classified as a "Feature" instead.)

(BTW, while doing due diligence on this issue, I determined that there was a previous bug #2129 that was filed against Rational + BigDecimal years ago that has almost the same description as 7176. At the time, Rational + BigDecimal returned a Rational; I think this is the more correct behavior, because any BigDecimal can be represented as a Rational, but not all Rationals can be represented as a BigDecimal. As a concrete example, 1/9 has no BigDecimal representation. Given that this behavior has already changed before, it seems like a fix for the commutativity of Float+BigDecimal should probably also deal with this other problem.)

https://bugs.ruby-lang.org/issues/2129



-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next