るりまサーチ (Ruby 2.5.0)

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

別のキーワード

  1. _builtin raise
  2. kernel raise
  3. fiber raise
  4. thread raise
  5. e2mmap raise

ライブラリ

クラス

検索結果

OpenSSL::BN#mod_exp(other, m) -> OpenSSL::BN (54394.0)

(self ** other) % m を返します。

(self ** other) % m を返します。

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

OpenSSL::BN.new("7").mod_exp(OpenSSL::BN.new("3"), OpenSSL::BN.new("6")) # => 1
//}

@param other 指数
@param m 剰余を取る数
@raise OpenSSL::BNError 計算時エラー