1563件ヒット
[1-100件を表示]
(0.050秒)
種類
ライブラリ
- ビルトイン (739)
- bigdecimal (65)
- fiddle (33)
-
fiddle
/ import (11) - mkmf (22)
-
net
/ ftp (9) - objspace (11)
- openssl (55)
- optparse (132)
- pathname (33)
- prime (11)
- scanf (6)
- shell (30)
-
shell
/ command-processor (30) -
shell
/ filter (30) - socket (55)
- stringio (7)
-
win32
/ registry (22) - win32ole (11)
- zlib (40)
クラス
- Array (35)
- BasicObject (11)
- BasicSocket (44)
- BigDecimal (65)
-
Encoding
:: Converter (44) - Enumerator (14)
-
Fiddle
:: Function (11) - File (84)
- Float (16)
- IO (40)
- Integer (66)
- Method (11)
-
Net
:: FTP :: MLSxEntry (9) - Numeric (11)
- Object (11)
-
OpenSSL
:: OCSP :: BasicResponse (11) -
OpenSSL
:: OCSP :: Request (11) -
OpenSSL
:: OCSP :: Response (11) -
OpenSSL
:: SSL :: SSLContext (11) - OptionParser (132)
- Pathname (33)
- Prime (11)
- Proc (22)
- Shell (30)
-
Shell
:: CommandProcessor (30) -
Shell
:: Filter (30) - Socket (11)
- String (58)
- StringIO (7)
- Struct (11)
- Time (36)
- UnboundMethod (11)
-
Win32
:: Registry (22) -
Zlib
:: GzipReader (33) -
Zlib
:: GzipWriter (7)
モジュール
- Enumerable (22)
- Fiddle (22)
- Kernel (110)
- Math (11)
- ObjectSpace (55)
- Process (33)
-
Process
:: GID (22) -
Process
:: UID (22) -
WIN32OLE
:: VARIANT (11)
キーワード
- % (11)
- ** (18)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
ALIGN
_ VOIDP (11) - ASN1 (11)
- CStruct (11)
-
EXCEPTION
_ ALL (11) - Marshal フォーマット (11)
-
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - Numeric (11)
- Rational (22)
- Ruby用語集 (11)
-
TYPE
_ VOIDP (11) -
VT
_ PTR (11) - [] (11)
-
_ _ id _ _ (11) - arity (33)
- at (36)
- bigdecimal (11)
-
bigdecimal
/ util (11) - binwrite (11)
- call (11)
-
check
_ nonce (11) - chmod (29)
- chown (29)
- concat (8)
-
convertible
_ int (22) - count (11)
- delete (29)
- div (11)
-
each
_ object (44) - eid= (22)
- facts (9)
- format (11)
- frexp (11)
- getaddrinfo (11)
- getc (11)
-
grant
_ privilege (22) - groups (11)
- hash (11)
-
int
_ from _ prime _ division (11) - kill (11)
- lchmod (11)
- lchown (11)
- lineno (11)
- lutime (7)
- mathn (4)
-
memsize
_ of (11) - mode (22)
- new (14)
- on (132)
- pack (19)
- pack テンプレート文字列 (11)
- pow (22)
- power (14)
-
primitive
_ convert (44) -
rb
_ quad _ pack (1) -
rb
_ quad _ unpack (1) -
rb
_ to _ integer (11) - read (11)
- readchar (11)
- recvmsg (11)
-
recvmsg
_ nonblock (11) - rm (18)
- round (27)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) - scanf (6)
- sendmsg (11)
-
sendmsg
_ nonblock (11) -
session
_ cache _ stats (11) - spawn (55)
- split (11)
- sprintf (11)
- sprintf フォーマット (11)
- status (22)
- sum (38)
- syscall (11)
- sysopen (11)
- sysseek (11)
-
to
_ f (22) -
to
_ int (11) - unlink (11)
- unpack (11)
- utime (29)
-
values
_ at (11) - write (54)
- このマニュアルのヘルプ (11)
- セキュリティモデル (8)
検索結果
先頭5件
-
Integer
# *(other) -> Numeric (39106.0) -
算術演算子。積を計算します。
...算術演算子。積を計算します。
@param other 二項演算の右側の引数(対象)
@return 計算結果
//emlist[][ruby]{
2 * 3 # => 6
//}... -
Integer
# **(other) -> Numeric (27107.0) -
算術演算子。冪(べき乗)を計算します。
...elf**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0......# => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8) # => -7
//}
結果が巨大すぎる整数になりそうなとき、警告を出したうえで Float::INFINITY を返します。
//emlist[計算を......放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}
判定の閾値は変わりえます。
@see BigDecimal#power... -
Integer
# pow(other , modulo) -> Integer (24107.0) -
算術演算子。冪(べき乗)を計算します。
...elf**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0......# => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8) # => -7
//}
結果が巨大すぎる整数になりそうなとき、警告を出したうえで Float::INFINITY を返します。
//emlist[計算を......放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}
判定の閾値は変わりえます。
@see BigDecimal#power... -
Integer
# pow(other) -> Numeric (24007.0) -
算術演算子。冪(べき乗)を計算します。
...elf**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0......# => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8) # => -7
//}
結果が巨大すぎる整数になりそうなとき、警告を出したうえで Float::INFINITY を返します。
//emlist[計算を......放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}
判定の閾値は変わりえます。
@see BigDecimal#power... -
Integer
# round(ndigits = 0 , half: :up) -> Integer | Float (21125.0) -
self ともっとも近い整数を返します。
...を指定した場合、Integer を返します。
小数点位置から左に少なくとも n 個の 0 が並びます。
@param half ちょうど半分の値の丸め方を指定します。
サポートされている値は以下の通りです。
* :up or nil: 0から遠......い方に丸められます。
* :even: もっとも近い偶数に丸められます。
* :down: 0に近い方に丸められます。
//emlist[][ruby]{
1.round # => 1
1.round(2) # => 1.0
15.round(-1) # => 20
(-15).round(-1) # => -20
25.round(-1, half: :up) # => 30
25.roun... -
Integer
# round(ndigits = 0 , half: :up) -> Integer (21119.0) -
self ともっとも近い整数を返します。
...方を指定します。
サポートされている値は以下の通りです。
* :up or nil: 0から遠い方に丸められます。
* :even: もっとも近い偶数に丸められます。
* :down: 0に近い方に丸められます。
//emlist[][ruby]{
1.round # => 1
1.ro... -
Integer
# to _ f -> Float (21012.0) -
self を浮動小数点数(Float)に変換します。
...self を浮動小数点数(Float)に変換します。
self が Float の範囲に収まらない場合、Float::INFINITY を返します。
//emlist[][ruby]{
1.to_f # => 1.0
(Float::MAX.to_i * 2).to_f # => Infinity
(-Float::MAX.to_i * 2).to_f # => -Infinity
//}... -
static VALUE rb
_ to _ integer(VALUE val , char *method) (6200.0) -
-
BigDecimal
# **(n) -> BigDecimal (6106.0) -
self の n 乗を計算します。
...self の n 乗を計算します。
戻り値の有効桁数は self の有効桁数の n 倍以上になります。
@param n selfを other 乗する数を指定します。
@param prec 有効桁数を整数で指定します。
@see Integer#pow... -
BigDecimal
# power(n) -> BigDecimal (3006.0) -
self の n 乗を計算します。
...self の n 乗を計算します。
戻り値の有効桁数は self の有効桁数の n 倍以上になります。
@param n selfを other 乗する数を指定します。
@param prec 有効桁数を整数で指定します。
@see Integer#pow... -
BigDecimal
# power(n , prec) -> BigDecimal (3006.0) -
self の n 乗を計算します。
...self の n 乗を計算します。
戻り値の有効桁数は self の有効桁数の n 倍以上になります。
@param n selfを other 乗する数を指定します。
@param prec 有効桁数を整数で指定します。
@see Integer#pow... -
NEWS for Ruby 3
. 0 . 0 (1704.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...照してください。
== 言語仕様の変更
* Keyword arguments are now separated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords......gument and no keywords.
16166
//emlist[][ruby]{
pr = proc{|*a, **kw| [a, kw]}
pr.call([1])
# 2.7 => [[1], {}]
# 3.0 => [[[1]], {}]
pr.call([1, {a: 1}])
# 2.7 => [[1], {:a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}
* Arguments forwarding (`...`) now supports leading arguments.......array. 12706
* Now `{ a: 1 }.each(&->(k, v) { })` raises an ArgumentError due to lambda's arity check.
* When writing to STDOUT redirected to a closed pipe, no broken pipe error message will be shown now. 14413
* `TRUE`/`FALSE`/`NIL` constants are no longer defined.
* Integer#zero? overr...