ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:39539] [Ruby 1.9 - Feature #5321][Open] Introducing Numeric#exact? and Numeric#inexact?
@ 2011-09-14  4:20 Kenta Murata
  2011-10-29 22:09 ` [ruby-core:40514] [ruby-trunk - Feature #5321] " Alexey Muranov
                   ` (21 more replies)
  0 siblings, 22 replies; 26+ messages in thread
From: Kenta Murata @ 2011-09-14  4:20 UTC (permalink / raw)
  To: ruby-core


Issue #5321 has been reported by Kenta Murata.

----------------------------------------
Feature #5321: Introducing Numeric#exact? and Numeric#inexact?
http://redmine.ruby-lang.org/issues/5321

Author: Kenta Murata
Status: Open
Priority: Normal
Assignee: Yukihiro Matsumoto
Category: core
Target version: 2.0


Ruby has several numeric classes such as Integer.
These classes are classified whether their instances represent numbers exactly.
According to this, Integer and Rational are exact, and Float and BigDecimal are inexact because they're always including error.
The exactness of a Complex depends on its real and imaginary parts.

Now, Ruby's numeric classes doesn't provide predicators to investigate the exactness of their instances.
So, if we want to examine whether a number is exactly zero, we must investigate the class of the number.
I want simple way to examine the number exactness.

I propose to introduce Numeric#exact? and/or Numeric#inexact? for resolving this inconvenience.



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

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

end of thread, other threads:[~2020-01-16  8:05 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-14  4:20 [ruby-core:39539] [Ruby 1.9 - Feature #5321][Open] Introducing Numeric#exact? and Numeric#inexact? Kenta Murata
2011-10-29 22:09 ` [ruby-core:40514] [ruby-trunk - Feature #5321] " Alexey Muranov
2011-10-29 23:57 ` [ruby-core:40519] " Charles Nutter
2011-10-30 12:29 ` [ruby-core:40524] " Alexey Muranov
2011-10-31 11:04   ` [ruby-core:40553] " Alex Young
2011-10-31 12:13 ` [ruby-core:40555] [ruby-trunk - Feature #5321][Assigned] " Yusuke Endoh
2011-10-31 12:55 ` [ruby-core:40556] [ruby-trunk - Feature #5321] " Yusuke Endoh
2011-10-31 13:21 ` [ruby-core:40557] " Alexey Muranov
2011-10-31 13:32 ` [ruby-core:40558] " Kenta Murata
2011-10-31 13:54 ` [ruby-core:40559] " tadayoshi funaba
2011-10-31 14:34   ` [ruby-core:40565] " Yusuke Endoh
2011-10-31 13:55 ` [ruby-core:40560] " Kenta Murata
2011-10-31 14:24   ` [ruby-core:40563] " Yusuke Endoh
2011-10-31 14:13 ` [ruby-core:40561] " Alexey Muranov
2011-10-31 14:54 ` [ruby-core:40566] " Kenta Murata
2011-10-31 14:59 ` [ruby-core:40567] " tadayoshi funaba
2011-10-31 15:32 ` [ruby-core:40570] " Alexey Muranov
2011-11-01 12:14 ` [ruby-core:40622] [ruby-trunk - Feature #5321][Assigned] " Masaya Tarui
2012-11-20 11:55 ` [ruby-core:49681] [ruby-trunk - Feature #5321] " mame (Yusuke Endoh)
2019-08-01  1:02 ` [ruby-core:94087] [Ruby master Feature#5321] " merch-redmine
2020-01-04  6:27 ` [ruby-core:96652] " wishdev
2020-01-15  2:23 ` [ruby-core:96861] " akr
2020-01-15  2:43 ` [ruby-core:96863] " sawadatsuyoshi
2020-01-15  3:03 ` [ruby-core:96864] " akr
2020-01-15  6:19 ` [ruby-core:96868] " sawadatsuyoshi
2020-01-16  8:04 ` [ruby-core:96899] " matz

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).