1921件ヒット
[1-100件を表示]
(0.036秒)
別のキーワード
種類
- インスタンスメソッド (1069)
- モジュール関数 (684)
- 特異メソッド (168)
ライブラリ
- ビルトイン (1206)
- benchmark (60)
- bigdecimal (48)
-
bigdecimal
/ util (24) - cmath (240)
- csv (12)
- fiddle (24)
- json (12)
- matrix (72)
-
net
/ http (7) - optparse (144)
- securerandom (12)
- stringio (12)
-
webrick
/ httpserver (12) - win32ole (36)
クラス
-
Benchmark
:: Tms (60) - Bignum (30)
- Complex (12)
- Enumerator (19)
-
Fiddle
:: Function (24) - Fixnum (27)
- Float (273)
- Integer (84)
- Matrix (36)
-
Net
:: HTTP (7) - Numeric (130)
- OptionParser (144)
- Random (72)
- Range (2)
- Rational (84)
- String (36)
- StringIO (12)
- Time (77)
- Vector (36)
-
WEBrick
:: HTTPServer (12) -
WIN32OLE
_ TYPELIB (12) -
WIN32OLE
_ VARIANT (24)
モジュール
- BigMath (24)
- CMath (240)
-
JSON
:: Generator :: GeneratorMethods :: Float (12) - Kernel (84)
- Math (324)
- Process (12)
- SecureRandom (12)
キーワード
- % (30)
- * (42)
- ** (41)
- + (42)
- - (66)
-
/ (53) - < (12)
- <= (12)
- == (12)
- > (12)
- >= (12)
- BigDecimal (24)
- []= (12)
- acos (18)
- acos! (6)
- acosh (18)
- acosh! (6)
-
angle
_ with (12) - asin (18)
- asin! (6)
- asinh (18)
- asinh! (6)
- at (53)
- atan (18)
- atan! (6)
- atan2 (18)
- atan2! (6)
- atanh (18)
- atanh! (6)
- call (12)
- cbrt (18)
- cbrt! (6)
- ceil (13)
-
clock
_ gettime (12) - coerce (12)
- cofactor (12)
-
cofactor
_ expansion (12) - cos (18)
- cos! (6)
- cosh (18)
- cosh! (6)
- div (18)
- divmod (12)
- dot (12)
- eql? (12)
- erf (12)
- erfc (12)
- exp (30)
- exp! (6)
- fdiv (54)
- floor (14)
- format (12)
- frexp (12)
- gamma (12)
- hypot (12)
-
inner
_ product (12) -
laplace
_ expansion (12) - ldexp (12)
- lgamma (12)
- log (48)
- log! (12)
- log10 (18)
- log10! (6)
- log2 (18)
- log2! (6)
- memberwise (12)
- modulo (18)
- new (67)
- on (144)
- overlap? (2)
-
parse
_ csv (12) - pow (22)
- putc (12)
- quo (24)
- rand (96)
-
random
_ number (12) - rationalize (24)
- remainder (3)
- round (25)
- sin (18)
- sin! (6)
- sinh (18)
- sinh! (6)
- sprintf (12)
- sqrt (18)
- sqrt! (6)
- step (93)
- tan (18)
- tan! (6)
- tanh (18)
- tanh! (6)
-
to
_ d (24) -
to
_ i (21) -
to
_ json (12) - truncate (13)
-
write
_ timeout= (7)
検索結果
先頭5件
-
Float
# round(ndigits = 0) -> Integer | Float (21132.0) -
自身ともっとも近い整数もしくは実数を返します。
...中央値 0.5, -0.5 はそれぞれ 1,-1 に切り上げされます。
いわゆる四捨五入ですが、偶数丸めではありません。
@param ndigits 丸める位を指定します。
ndigitsが0ならば、小数点以下を四捨五入し、整数を返します。
ndigit......位で四捨五入されます。
ndigitsが0より小さいならば、小数点以上の指定された位で四捨五入されます。
@param half ちょうど半分の値の丸め方を指定します。
サポートされている値は以下の通りです。
* :up or nil: 0......d(-2) # => 93600
t.round(-3) # => 94000
t.round(-100) # => 0
2.5.round(half: :up) # => 3
2.5.round(half: :even) # => 2
2.5.round(half: :down) # => 2
3.5.round(half: :up) # => 4
3.5.round(half: :even) # => 4
3.5.round(half: :down) # => 3
//}
@see Float#ceil, Float#floor, Float#truncate... -
Float
# round(ndigits = 0 , half: :up) -> Integer | Float (21132.0) -
自身ともっとも近い整数もしくは実数を返します。
...中央値 0.5, -0.5 はそれぞれ 1,-1 に切り上げされます。
いわゆる四捨五入ですが、偶数丸めではありません。
@param ndigits 丸める位を指定します。
ndigitsが0ならば、小数点以下を四捨五入し、整数を返します。
ndigit......位で四捨五入されます。
ndigitsが0より小さいならば、小数点以上の指定された位で四捨五入されます。
@param half ちょうど半分の値の丸め方を指定します。
サポートされている値は以下の通りです。
* :up or nil: 0......d(-2) # => 93600
t.round(-3) # => 94000
t.round(-100) # => 0
2.5.round(half: :up) # => 3
2.5.round(half: :even) # => 2
2.5.round(half: :down) # => 2
3.5.round(half: :up) # => 4
3.5.round(half: :even) # => 4
3.5.round(half: :down) # => 3
//}
@see Float#ceil, Float#floor, Float#truncate... -
Float
# ceil(ndigits = 0) -> Integer | Float (21131.0) -
自身と等しいかより大きな整数のうち最小のものを返します。
...等しいかより大きな整数のうち最小のものを返します。
@param ndigits 10進数での小数点以下の有効桁数を整数で指定します。
正の整数を指定した場合、Float を返します。
小数点以下を、最大 n 桁にしま......34567.89.ceil(-4) # => 40000
34567.89.ceil(-3) # => 35000
34567.89.ceil(-2) # => 34600
34567.89.ceil(-1) # => 34570
34567.89.ceil(0) # => 34568
34567.89.ceil(1) # => 34567.9
34567.89.ceil(2) # => 34567.89
34567.89.ceil(3) # => 34567.89
//}
@see Float#floor, Float#round, Float#truncate... -
Float
# round(ndigits = 0) -> Integer | Float (21125.0) -
自身ともっとも近い整数もしくは実数を返します。
...中央値 0.5, -0.5 はそれぞれ 1,-1 に切り上げされます。
いわゆる四捨五入ですが、偶数丸めではありません。
@param ndigits 丸める位を指定します。
ndigitsが0ならば、小数点以下を四捨五入し、整数を返します。
ndigit......3.141592653589793
t.round(3) # => 3.142
t.round(0) # => 3
t.round(1) # => 3.1
t = t**10 # => 93648.04747608298
t.round(-0) # => 93648
t.round(-1) # => 93650
t.round(-2) # => 93600
t.round(-3) # => 94000
t.round(-100) # => 0
//}
@see Float#ceil, Float#floor, Float#truncate... -
Float
# floor(ndigits = 0) -> Integer | Float (21119.0) -
自身と等しいかより小さな整数のうち最大のものを返します。
...等しいかより小さな整数のうち最大のものを返します。
@param ndigits 10進数での小数点以下の有効桁数を整数で指定します。
正の整数を指定した場合、Float を返します。
小数点以下を、最大 n 桁にしま......oor(-4) # => 30000
34567.89.floor(-3) # => 34000
34567.89.floor(-2) # => 34500
34567.89.floor(-1) # => 34560
34567.89.floor(0) # => 34567
34567.89.floor(1) # => 34567.8
34567.89.floor(2) # => 34567.89
34567.89.floor(3) # => 34567.89
//}
@see Numeric#ceil, Numeric#round, Float#truncate... -
Float
# truncate(ndigits = 0) -> Integer | Float (21113.0) -
小数点以下を切り捨てて値を整数に変換します。
...小数点以下を切り捨てて値を整数に変換します。
@param ndigits 10進数での小数点以下の有効桁数を整数で指定します。
正の整数を指定した場合、Float を返します。
小数点以下を、最大 n 桁にします。... -
Float
# %(other) -> Float (21108.0) -
算術演算子。剰余を計算します。
...算術演算子。剰余を計算します。
@param other 二項演算の右側の引数(対象)
//emlist[例][ruby]{
# 剰余
3.0 % 1.2 # => 0.6000000000000001
3.0 % 0.0 # ZeroDivisionError
//}... -
Float
# modulo(other) -> Float (21108.0) -
算術演算子。剰余を計算します。
...算術演算子。剰余を計算します。
@param other 二項演算の右側の引数(対象)
//emlist[例][ruby]{
# 剰余
3.0 % 1.2 # => 0.6000000000000001
3.0 % 0.0 # ZeroDivisionError
//}... -
Float
# *(other) -> Float (21107.0) -
算術演算子。積を計算します。
...算術演算子。積を計算します。
@param other 二項演算の右側の引数(対象)
//emlist[例][ruby]{
# 積
2.4 * 3 # => 7.2
//}... -
Float
# **(other) -> Float (21107.0) -
算術演算子。冪を計算します。
...算術演算子。冪を計算します。
@param other 二項演算の右側の引数(対象)
//emlist[例][ruby]{
# 冪
1.2 ** 3.0 # => 1.7279999999999998
3.0 + 4.5 - 1.3 / 2.4 * 3 % 1.2 ** 3.0 # => 5.875
0.0 ** 0 # => 1.0
//}... -
Float
# +(other) -> Float (21107.0) -
算術演算子。和を計算します。
...算術演算子。和を計算します。
@param other 二項演算の右側の引数(対象)
//emlist[例][ruby]{
# 和
3.0 + 4.5 # => 7.5
//}...