< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(スレッド移動)
N :次の記事(スレッド移動)
|<:前のスレッド
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Issue #16677 has been updated by nobu (Nobuyoshi Nakada).
sawa (Tsuyoshi Sawada) wrote in #note-25:
> > A space after `-` means same things.
>
> Thank you for the information. That further strengthens the motivation for the proposal.
Really?
It feels counter-motivation to me.
----------------------------------------
Bug #16677: Negative integer powered (**) to a float number results in a complex
https://bugs.ruby-lang.org/issues/16677#change-85465
* Author: CamilleDrapier (Camille Drapier)
* Status: Closed
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* ruby -v: 2.5.7, 2.6.5, 2.7.0
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
Not sure if this is an unexpected behavior.
This works as I expect:
```
-2 ** 2.2 # => -4.59479341998814
```
But when I change the code a bit, it gives me a complex:
```ruby
-2.to_i ** 2.2 # => (3.717265962412589+2.7007518095995273i)
a = -2; a ** 2.2 # => (3.717265962412589+2.7007518095995273i)
```
This seems to happen only with negative numbers and float powers. I think it might be related to how `Fixnum` is treated differently from other classes by the power function.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>