ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:90843] [Ruby trunk Bug#15491] r62701 introduced the incompatibility of Complex#+, #-, and #* removing #ifndef PRESERVE_SIGNEDZERO
       [not found] <redmine.issue-15491.20190101173340@ruby-lang.org>
@ 2019-01-01 17:33 ` muraken
  2019-01-01 17:46 ` [ruby-core:90844] " muraken
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: muraken @ 2019-01-01 17:33 UTC (permalink / raw)
  To: ruby-core

Issue #15491 has been reported by mrkn (Kenta Murata).

----------------------------------------
Bug #15491: r62701 introduced the incompatibility of Complex#+, #-, and #* removing #ifndef PRESERVE_SIGNEDZERO
https://bugs.ruby-lang.org/issues/15491

* Author: mrkn (Kenta Murata)
* Status: Assigned
* Priority: Normal
* Assignee: mrkn (Kenta Murata)
* Target version: 
* ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
In r62701, preprocessor conditions `#ifndef PRESERVE_SIGNEDZERO` in `f_add`, `f_mul`, and `f_sub` functions were removed.
These changes introduced the incompatibility for some special cases.

For example, the results of the following code shows the different sign of the imaginary part:

```
p Complex(-0.0, 0) * Complex(0, 0)
#=> (-0.0+0.0i)  on 2.5.3
#=> (-0.0-0.0i)  on 2.6.0
```

Moreover, the following code shows the different values in the real part:

```
class Integer
  def +(*); 42; end
end
p Complex(1, 2) + Complex(0, 1)
#=> (42+42i) on 2.5.3
#=> (0+42i)  on 2.6.0
```



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

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

* [ruby-core:90844] [Ruby trunk Bug#15491] r62701 introduced the incompatibility of Complex#+, #-, and #* removing #ifndef PRESERVE_SIGNEDZERO
       [not found] <redmine.issue-15491.20190101173340@ruby-lang.org>
  2019-01-01 17:33 ` [ruby-core:90843] [Ruby trunk Bug#15491] r62701 introduced the incompatibility of Complex#+, #-, and #* removing #ifndef PRESERVE_SIGNEDZERO muraken
@ 2019-01-01 17:46 ` muraken
  2019-01-02  4:25 ` [ruby-core:90849] [Ruby trunk Bug#15491][Closed] " muraken
  2019-01-17 23:08 ` [ruby-core:91153] [Ruby trunk Bug#15491] " naruse
  3 siblings, 0 replies; 4+ messages in thread
From: muraken @ 2019-01-01 17:46 UTC (permalink / raw)
  To: ruby-core

Issue #15491 has been updated by mrkn (Kenta Murata).


I made a patch https://github.com/ruby/ruby/pull/2062

----------------------------------------
Bug #15491: r62701 introduced the incompatibility of Complex#+, #-, and #* removing #ifndef PRESERVE_SIGNEDZERO
https://bugs.ruby-lang.org/issues/15491#change-76032

* Author: mrkn (Kenta Murata)
* Status: Assigned
* Priority: Normal
* Assignee: mrkn (Kenta Murata)
* Target version: 
* ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
In r62701, preprocessor conditions `#ifndef PRESERVE_SIGNEDZERO` in `f_add`, `f_mul`, and `f_sub` functions were removed.
These changes introduced the incompatibility for some special cases.

For example, the results of the following code shows the different sign of the imaginary part:

```
p Complex(-0.0, 0) * Complex(0, 0)
#=> (-0.0+0.0i)  on 2.5.3
#=> (-0.0-0.0i)  on 2.6.0
```

Moreover, the following code shows the different values in the real part:

```
class Integer
  def +(*); 42; end
end
p Complex(1, 2) + Complex(0, 1)
#=> (42+42i) on 2.5.3
#=> (0+42i)  on 2.6.0
```



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

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

* [ruby-core:90849] [Ruby trunk Bug#15491][Closed] r62701 introduced the incompatibility of Complex#+, #-, and #* removing #ifndef PRESERVE_SIGNEDZERO
       [not found] <redmine.issue-15491.20190101173340@ruby-lang.org>
  2019-01-01 17:33 ` [ruby-core:90843] [Ruby trunk Bug#15491] r62701 introduced the incompatibility of Complex#+, #-, and #* removing #ifndef PRESERVE_SIGNEDZERO muraken
  2019-01-01 17:46 ` [ruby-core:90844] " muraken
@ 2019-01-02  4:25 ` muraken
  2019-01-17 23:08 ` [ruby-core:91153] [Ruby trunk Bug#15491] " naruse
  3 siblings, 0 replies; 4+ messages in thread
From: muraken @ 2019-01-02  4:25 UTC (permalink / raw)
  To: ruby-core

Issue #15491 has been updated by mrkn (Kenta Murata).

Status changed from Assigned to Closed

Applied in changeset trunk|r66688.

----------
complex.c: fix against redefining component methods

This fixes the incompatibility (maybe unintentionally) introduced by
removal of `#ifndef PRESERVE_SIGNEDZERO` guards in f_add, f_mul, and
f_sub functions in r62701.  [Bug #15491] [ruby-core:90843]

----------------------------------------
Bug #15491: r62701 introduced the incompatibility of Complex#+, #-, and #* removing #ifndef PRESERVE_SIGNEDZERO
https://bugs.ruby-lang.org/issues/15491#change-76036

* Author: mrkn (Kenta Murata)
* Status: Closed
* Priority: Normal
* Assignee: mrkn (Kenta Murata)
* Target version: 
* ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
In r62701, preprocessor conditions `#ifndef PRESERVE_SIGNEDZERO` in `f_add`, `f_mul`, and `f_sub` functions were removed.
These changes introduced the incompatibility for some special cases.

For example, the results of the following code shows the different sign of the imaginary part:

```
p Complex(-0.0, 0) * Complex(0, 0)
#=> (-0.0+0.0i)  on 2.5.3
#=> (-0.0-0.0i)  on 2.6.0
```

Moreover, the following code shows the different values in the real part:

```
class Integer
  def +(*); 42; end
end
p Complex(1, 2) + Complex(0, 1)
#=> (42+42i) on 2.5.3
#=> (0+42i)  on 2.6.0
```



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

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

* [ruby-core:91153] [Ruby trunk Bug#15491] r62701 introduced the incompatibility of Complex#+, #-, and #* removing #ifndef PRESERVE_SIGNEDZERO
       [not found] <redmine.issue-15491.20190101173340@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2019-01-02  4:25 ` [ruby-core:90849] [Ruby trunk Bug#15491][Closed] " muraken
@ 2019-01-17 23:08 ` naruse
  3 siblings, 0 replies; 4+ messages in thread
From: naruse @ 2019-01-17 23:08 UTC (permalink / raw)
  To: ruby-core

Issue #15491 has been updated by naruse (Yui NARUSE).

Backport changed from 2.4: DONTNEED, 2.5: DONTNEED, 2.6: REQUIRED to 2.4: DONTNEED, 2.5: DONTNEED, 2.6: DONE

ruby_2_6 r66854 merged revision(s) 66681,66682,66684,66688,66697,66751,66693,66694.

----------------------------------------
Bug #15491: r62701 introduced the incompatibility of Complex#+, #-, and #* removing #ifndef PRESERVE_SIGNEDZERO
https://bugs.ruby-lang.org/issues/15491#change-76384

* Author: mrkn (Kenta Murata)
* Status: Closed
* Priority: Normal
* Assignee: mrkn (Kenta Murata)
* Target version: 
* ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
* Backport: 2.4: DONTNEED, 2.5: DONTNEED, 2.6: DONE
----------------------------------------
In r62701, preprocessor conditions `#ifndef PRESERVE_SIGNEDZERO` in `f_add`, `f_mul`, and `f_sub` functions were removed.
These changes introduced the incompatibility for some special cases.

For example, the results of the following code shows the different sign of the imaginary part:

```
p Complex(-0.0, 0) * Complex(0, 0)
#=> (-0.0+0.0i)  on 2.5.3
#=> (-0.0-0.0i)  on 2.6.0
```

Moreover, the following code shows the different values in the real part:

```
class Integer
  def +(*); 42; end
end
p Complex(1, 2) + Complex(0, 1)
#=> (42+42i) on 2.5.3
#=> (0+42i)  on 2.6.0
```



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

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

end of thread, other threads:[~2019-01-17 23:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-15491.20190101173340@ruby-lang.org>
2019-01-01 17:33 ` [ruby-core:90843] [Ruby trunk Bug#15491] r62701 introduced the incompatibility of Complex#+, #-, and #* removing #ifndef PRESERVE_SIGNEDZERO muraken
2019-01-01 17:46 ` [ruby-core:90844] " muraken
2019-01-02  4:25 ` [ruby-core:90849] [Ruby trunk Bug#15491][Closed] " muraken
2019-01-17 23:08 ` [ruby-core:91153] [Ruby trunk Bug#15491] " naruse

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