ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:58755] [ruby-trunk - Bug #9191][Open] Inconsistent comparison between Float and BigDecimal
@ 2013-12-02  0:01 vatsu (Gustavo Sales)
  2013-12-02  1:04 ` [ruby-core:58759] [ruby-trunk - Bug #9191][Closed] " hsbt (Hiroshi SHIBATA)
  0 siblings, 1 reply; 2+ messages in thread
From: vatsu (Gustavo Sales) @ 2013-12-02  0:01 UTC (permalink / raw
  To: ruby-core


Issue #9191 has been reported by vatsu (Gustavo Sales).

----------------------------------------
Bug #9191: Inconsistent comparison between Float and BigDecimal
https://bugs.ruby-lang.org/issues/9191

Author: vatsu (Gustavo Sales)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v:  2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin11.4.2]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


I was checking a possible inconsistency on ActiveModel and I found situations where comparing BigDecimal to Float differs to comparing Float to BigDecimal.

I have create a simple ruby script to exemplify the problem. The script is attach to this issue and output is as follows:

Instance number 706.05
###########
Instance number 706.06
Inconsistence:
0.70606E3 > 706.06
706.06 < 0.70606E3
=========
Inconsistence:
0.70606E3 <= 706.06
706.06 >= 0.70606E3
=========
###########
Instance number 706.07
Inconsistence:
0.70607E3 < 706.07
706.07 > 0.70607E3
=========
Inconsistence:
0.70607E3 >= 706.07
706.07 <= 0.70607E3
=========
###########
Instance number 706.08
###########


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ruby-core:58759] [ruby-trunk - Bug #9191][Closed] Inconsistent comparison between Float and BigDecimal
  2013-12-02  0:01 [ruby-core:58755] [ruby-trunk - Bug #9191][Open] Inconsistent comparison between Float and BigDecimal vatsu (Gustavo Sales)
@ 2013-12-02  1:04 ` hsbt (Hiroshi SHIBATA)
  0 siblings, 0 replies; 2+ messages in thread
From: hsbt (Hiroshi SHIBATA) @ 2013-12-02  1:04 UTC (permalink / raw
  To: ruby-core


Issue #9191 has been updated by hsbt (Hiroshi SHIBATA).

Status changed from Open to Closed

duplicated #9192
----------------------------------------
Bug #9191: Inconsistent comparison between Float and BigDecimal
https://bugs.ruby-lang.org/issues/9191#change-43327

Author: vatsu (Gustavo Sales)
Status: Closed
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v:  2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin11.4.2]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


I was checking a possible inconsistency on ActiveModel and I found situations where comparing BigDecimal to Float differs to comparing Float to BigDecimal.

I have create a simple ruby script to exemplify the problem. The script is attach to this issue and output is as follows:

Instance number 706.05
###########
Instance number 706.06
Inconsistence:
0.70606E3 > 706.06
706.06 < 0.70606E3
=========
Inconsistence:
0.70606E3 <= 706.06
706.06 >= 0.70606E3
=========
###########
Instance number 706.07
Inconsistence:
0.70607E3 < 706.07
706.07 > 0.70607E3
=========
Inconsistence:
0.70607E3 >= 706.07
706.07 <= 0.70607E3
=========
###########
Instance number 706.08
###########


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-02  1:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-02  0:01 [ruby-core:58755] [ruby-trunk - Bug #9191][Open] Inconsistent comparison between Float and BigDecimal vatsu (Gustavo Sales)
2013-12-02  1:04 ` [ruby-core:58759] [ruby-trunk - Bug #9191][Closed] " hsbt (Hiroshi SHIBATA)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).