るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.013秒)
トップページ > バージョン:2.5.0[x] > クエリ:Math::DomainError[x] > 種類:特異メソッド[x]

別のキーワード

  1. math log
  2. math sqrt
  3. _builtin math
  4. bigdecimal/math e
  5. bigdecimal/math cos

ライブラリ

クラス

検索結果

Integer.sqrt(n) -> Integer (22.0)

非負整数 n の整数の平方根を返します。すなわち n の平方根以下の 最大の非負整数を返します。

非負整数 n の整数の平方根を返します。すなわち n の平方根以下の
最大の非負整数を返します。

@param n 非負整数。Integer ではない場合は、最初に Integer に変換されます。
@raise Math::DomainError n が負の整数の時に発生します。

//emlist[][ruby]{
Integer.sqrt(0) # => 0
Integer.sqrt(1) # => 1
Integer.sqrt(24) # => 4
Integer.sqrt(25) # => 5
Integer.sqrt(10**...