るりまサーチ

最速Rubyリファレンスマニュアル検索!
33件ヒット [1-33件を表示] (0.149秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:l[x] > クエリ:<[x] > クラス:OpenSSL::BN[x]

別のキーワード

  1. matrix l
  2. kernel $-l
  3. _builtin $-l
  4. lupdecomposition l
  5. l

ライブラリ

キーワード

検索結果

OpenSSL::BN#<<(other) -> OpenSSL::BN (9202.0)

自身を other ビット左シフトした値を返します。

...自身を other ビット左シフトした値を返します。

//emlist[][ruby]{
bn = 1.to_bn
pp bn << 1 # => #<OpenSSL::BN 2>
pp bn # => #<OpenSSL::BN 1>
//}

@param other シフトするビット数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#lshift!...

OpenSSL::BN#<=>(other) -> -1 | 0 | 1 (9102.0)

自身と other を比較し、自身が小さいときには -1、 等しいときには 0、大きいときには 1 を返します。

...大きいときには 1 を返します。

//emlist[][ruby]{
require 'openssl'

OpenSSL::BN
.new(5) <=> 5 # => 0

OpenSSL::BN
.new(5) <=> OpenSSL::BN.new(9) # => -1
OpenSSL::BN
.new(5) <=> OpenSSL::BN.new(5) # => 0
OpenSSL::BN
.new(5) <=> OpenSSL::BN.new(-5) # => 1
//}

@param other 比較する...
...整数
@raise TypeError 比較できないときに発生します。
@see OpenSSL::BN#ucmp...

OpenSSL::BN#cmp(other) -> -1 | 0 | 1 (6002.0)

自身と other を比較し、自身が小さいときには -1、 等しいときには 0、大きいときには 1 を返します。

...大きいときには 1 を返します。

//emlist[][ruby]{
require 'openssl'

OpenSSL::BN
.new(5) <=> 5 # => 0

OpenSSL::BN
.new(5) <=> OpenSSL::BN.new(9) # => -1
OpenSSL::BN
.new(5) <=> OpenSSL::BN.new(5) # => 0
OpenSSL::BN
.new(5) <=> OpenSSL::BN.new(-5) # => 1
//}

@param other 比較する...
...整数
@raise TypeError 比較できないときに発生します。
@see OpenSSL::BN#ucmp...