[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dennou-ruby:003298] Re: ruby-lapack の ruby 1.9.1 対応.



佐々木様

手元では
[seiya@student]~/install/ruby-lapack% ruby  samples/dsyevr.rb
3
NArray.float(3):
[ 2.66454e-15, 1.0, 3.0 ]
NArray.float(3,3):
[ [ 0.57735, -0.57735, 0.57735 ],
  [ -0.707107, -9.42055e-16, 0.707107 ],
  [ 0.408248, 0.816497, 0.408248 ] ]
NArray.int(12):
[ 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0 ]
NArray.float(78):
[ 99.0, 0.0, 0.0, 1.0, 2.0, 1.0, 96.0, 1.0, 0.0, -2.0, -0.5, ... ]
NArray.int(60):
[ 30, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 3, 0, 3, 0, 3, 0, 2, ... ]
0
NArray.float(3,3):
[ [ 1.0, 1.0, 0.0 ],
  [ 1.0, 2.0, 1.0 ],
  [ 0.0, 1.0, 1.0 ] ]
[seiya@student]~/install/ruby-lapack% ruby -v
ruby 1.9.2p0 (2010-08-18) [x86_64-linux]

となりますね。
使っているのは、
CLAPACK-3.1.1.1
です。

ちょっと ruby のバージョンを上げてみます。


西澤誠也

2011/3/24 Youhei SASAKI <uwabami@xxxxxxxxxxxxxx>:
> 西澤様: 佐々木です.
>
> ruby-lapack のパッケージを作成しています.
>
> バイナリパッケージ自体は作成できたのですが ruby1.8 の場合と ruby1.9.2 の
> 場合で samples/dsyevr.rb の結果が異なるので, 気になっています.
>
> # ちゃんとドキュメント読むべきなんでしょうけれど...
>
> 変な所は
>
>  % ruby1.9.1 -d -w dsys
>  - snip -
>  NArray.int(12):
>  [ 1, 3, 1, 3, 1, 3, 1814901814, 2020961897, 1836412463, 1815049586, ... ]
>  - snip -
>
> で, あからさまに変な所を参照していそうです.
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>  % ruby1.8 -d -w dsyevr.rb
>  3
>  NArray.float(3):
>  [ 2.66454e-15, 1.0, 3.0 ]
>  NArray.float(3,3):
>  [ [ 0.57735, -0.57735, 0.57735 ],
>   [ -0.707107, -9.42055e-16, 0.707107 ],
>   [ 0.408248, 0.816497, 0.408248 ] ]
>  NArray.int(12):
>  [ 1, 3, 1, 3, 1, 3, 0, 0, 0, 0, 0, 0 ]
>  NArray.float(78):
>  [ 78.0, 0.0, 0.0, 1.0, 2.0, 1.0, 6.0, 1.0, 0.0, -2.0, -0.5, -4.15668e-13, ... ]
>  NArray.int(60):
>  [ 30, 0, 0, 1, 1, 1, 1, 2, 3, 3, 3, 2, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... ]
>  0
>  NArray.float(3,3):
>  [ [ 1.0, 1.0, 0.0 ],
>   [ 1.0, 2.0, 1.0 ],
>   [ 0.0, 1.0, 1.0 ] ]
>  % ruby1.9.1 -v
>  ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]
>  # => バイナリ名が ruby1.9.1 ですが Ruby 1.9.2 です.
>  % ruby1.9.1 -d -w dsys
>  <internal:lib/rubygems/defaults>:24: warning: statement not reached
>  <internal:lib/rubygems/defaults>:76: warning: statement not reached
>  lib/complex.rb is deprecated
>  3
>  NArray.float(3):
>  [ 2.66454e-15, 1.0, 3.0 ]
>  NArray.float(3,3):
>  [ [ 0.57735, -0.57735, 0.57735 ],
>   [ -0.707107, -9.42055e-16, 0.707107 ],
>   [ 0.408248, 0.816497, 0.408248 ] ]
>  NArray.int(12):
>  [ 1, 3, 1, 3, 1, 3, 1814901814, 2020961897, 1836412463, 1815049586, ... ]
>  NArray.float(78):
>  [ 78.0, 0.0, 0.0, 1.0, 2.0, 1.0, 6.0, 1.0, 0.0, -2.0, -0.5, -4.15668e-13, ... ]
>  NArray.int(60):
>  [ 30, 0, 0, 1, 1, 1, 1, 2, 3, 3, 3, 2, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... ]
>  0
>  NArray.float(3,3):
>  [ [ 1.0, 1.0, 0.0 ],
>   [ 1.0, 2.0, 1.0 ],
>   [ 0.0, 1.0, 1.0 ] ]
>
> ---
> Youhei SASAKI <uwabami@xxxxxxxxxxxxxx>
>              <uwabami@xxxxxxxxxxxxxxxxxx>
> Department of Mathematics, Kyoto University
> GPG fingerprint:
>  4096/RSA: 66A4 EA70 4FE2 4055 8D6A C2E6 9394 F354 891D 7E07
>



-- 
Seiya Nishizawa
Center for Planetary Science, Kobe University
TEL : 078-803-6472
FAX : 078-803-5731