るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.066秒)
トップページ > クエリ:openssl[x] > バージョン:2.4.0[x] > クエリ:d[x] > クエリ:mod_inverse[x]

別のキーワード

  1. bigdecimal/util to_d
  2. float to_d
  3. openssl d
  4. openssl d=
  5. openssl op_tls_d5_bug

ライブラリ

クラス

検索結果

OpenSSL::BN#mod_inverse(m) -> OpenSSL::BN (105979.0)

自身の mod m における逆元を返します。

自身の mod m における逆元を返します。

(self * r) % m == 1 となる r を返します。
存在しない場合は例外 OpenSSL::BNError が発生します。

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

p 3.to_bn.mod_inverse(5) # => 2
p (3 * 2) % 5 # => 1
//}

@param m mod を取る数
@raise OpenSSL::BNError 計算時エラー