From: 5.5@moji•gr.jp
To: ruby-dev@ruby-lang.org
Subject: [ruby-dev:50658] [Ruby trunk Bug#13986][Closed] Integer#fdiv with Complex returns unexpected value
Date: Sat, 20 Oct 2018 23:55:32 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-74548.20181020235531.0859da5002b38661@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-13986.20171007134931@ruby-lang.org
Issue #13986 has been updated by 5.5 (5 5).
Status changed from Feedback to Closed
反応が遅くなってすみません。
現行の(修正後の)仕様について、そういうものなのだろう、と納得いたしました。
----------------------------------------
Bug #13986: Integer#fdiv with Complex returns unexpected value
https://bugs.ruby-lang.org/issues/13986#change-74548
* Author: 5.5 (5 5)
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin15]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Ruby 2.4 では,`Integer#fdiv` に `Complex` オブジェクトを与えると,期待と違う値が得られる場合があります。
```ruby
p 1.fdiv(1+0i) #=> -1.404447761611185e+306
p 1.fdiv(1i) #=> -1.0e-323
```
期待は,それぞれ
```ruby
Complex(1.0, 0.0)
Complex(0.0, -1.0)
```
でした。
Ruby 2.3.3 では期待のとおりでした。
--
https://bugs.ruby-lang.org/
prev parent reply other threads:[~2018-10-20 23:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <redmine.issue-13986.20171007134931@ruby-lang.org>
2017-10-07 13:49 ` [ruby-dev:50281] [Ruby trunk Bug#13986] Integer#fdiv with Complex returns unexpected value 5.5
2017-10-07 23:13 ` [ruby-dev:50282] [Ruby trunk Bug#13986][Feedback] " nobu
2018-10-20 23:55 ` 5.5 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.ruby-lang.org/en/community/mailing-lists/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-74548.20181020235531.0859da5002b38661@ruby-lang.org \
--to=ruby-dev@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).