[#100689] [Ruby master Feature#17303] Make webrick to bundled gems or remove from stdlib — hsbt@...
Issue #17303 has been reported by hsbt (Hiroshi SHIBATA).
11 messages
2020/11/02
[#100852] [Ruby master Feature#17326] Add Kernel#must! to the standard library — zimmerman.jake@...
Issue #17326 has been reported by jez (Jake Zimmerman).
24 messages
2020/11/14
[#100930] [Ruby master Feature#17333] Enumerable#many? — masafumi.o1988@...
Issue #17333 has been reported by okuramasafumi (Masafumi OKURA).
10 messages
2020/11/18
[#101071] [Ruby master Feature#17342] Hash#fetch_set — hunter_spawn@...
Issue #17342 has been reported by MaxLap (Maxime Lapointe).
26 messages
2020/11/25
[ruby-core:100846] [Ruby master Bug#17318] Raising float to the power of other issue
From:
gotoken@...
Date:
2020-11-14 01:41:58 UTC
List:
ruby-core #100846
Issue #17318 has been updated by gotoken (Kentaro Goto). That depends on your purpose or background of the problem. In non-math situations, `power(a, b)` should not return any ordinary number for given `a`<0 where `power(a, b)` stands for "`a` to the power of `b`" over real, just identical to your notation `raise(a, b)`. In such cases, so the function may raise an exception or returns `float::NAN` if `a<0` or `a==0 && b==0` held. ---------------------------------------- Bug #17318: Raising float to the power of other issue https://bugs.ruby-lang.org/issues/17318#change-88488 * Author: deXterbed (Manoj Mishra) * Status: Rejected * Priority: Normal * ruby -v: 2.6.3 * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- Raising a negative float to another float results in a complex number. Interestingly, doing the same thing without using variables works fine! Sample Snippet: $ irb 2.6.3 :001 > x=-0.4790529833050308 => -0.4790529833050308 2.6.3 :002 > y=0.9918032786885246 => 0.9918032786885246 2.6.3 :003 > x**y => (-0.48179173935576963+0.012409246172848264i) 2.6.3 :004 > -0.4790529833050308**0.9918032786885246 => -0.4819515219418196 -- 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>