[#8824] [REQ] Integer#{hex,dec,oct,bin}, String#bin — gotoken@... (GOTO Kentaro)

ごとけんです

38 messages 2000/01/05
[#8839] Re: [REQ] Integer#{hex,dec,oct,bin}, String#bin — matz@... (Yukihiro Matsumoto) 2000/01/06

まつもと ゆきひろです

[#8842] Re: [REQ] Integer#{hex,dec,oct,bin}, String#bin — gotoken@... (GOTO Kentaro) 2000/01/06

ごとけんです

[#8843] Re: [REQ] Integer#{hex,dec,oct,bin}, String#bin — matz@... (Yukihiro Matsumoto) 2000/01/06

まつもと ゆきひろです

[#8844] Re: [REQ] Integer#{hex,dec,oct,bin}, String#bin — gotoken@... (GOTO Kentaro) 2000/01/06

ごとけんです

[#8846] Re: [REQ] Integer#{hex,dec,oct,bin}, String#bin — matz@... (Yukihiro Matsumoto) 2000/01/06

まつもと ゆきひろです

[#8847] Re: [REQ] Integer#{hex,dec,oct,bin}, String#bin — gotoken@... (GOTO Kentaro) 2000/01/06

ごとけんです

[#8893] Re: [ruby-list:20142] Re: Range expansion? — Akinori MUSHA aka knu <knu@...>

 knuです。ruby-listから舞台を移しました。

13 messages 2000/01/09

[#8980] 1.4.3 patch for near-future *BSD IPv6 support — Jun-ichiro itojun Hagino <itojun@...>

近い将来の{Net,Free,Open}BSDにはKAME IPv6 stackが統合されています。

17 messages 2000/01/20
[#8981] Re: 1.4.3 patch for near-future *BSD IPv6 support — Jun-ichiro itojun Hagino <itojun@...> 2000/01/20

> それから、

[ruby-dev:8886] Complex#divmod

From: Masahiro TANAKA <masa@...>
Date: 2000-01-08 14:15:47 UTC
List: ruby-dev #8886
田中@ISASです。ついでに気になっていることを。

Complex#divmod の振る舞いがよくわかりません。
lib/complex.rb の以下のパッチは正しいでしょうか?

   def divmod(other)
     if other.kind_of?(Complex)
       rdiv, rmod = @real.divmod(other.real)
       idiv, imod = @image.divmod(other.image)
-      return Complex(rdiv, idiv), Complex(rmod, rdiv)
+      return Complex(rdiv, idiv), Complex(rmod, imod)
     elsif Complex.generic?(other)
       Complex(@real.divmod(other), @image.divmod(other))
     else
       x , y = other.coerce(self)
       x.divmod(y)
     end
   end

これにしても、複素数の割り算からは連想できなかったのですが...

田中昌宏

In This Thread

Prev Next