3132件ヒット
[101-200件を表示]
(0.034秒)
ライブラリ
- ビルトイン (1989)
- benchmark (132)
- bigdecimal (77)
-
bigdecimal
/ newton (11) -
bigdecimal
/ util (22) - cmath (240)
- csv (33)
- fiddle (55)
- json (44)
- mathn (4)
- matrix (220)
- objspace (11)
- optparse (132)
- securerandom (11)
- set (11)
- stringio (11)
-
webrick
/ httpserver (11) - win32ole (44)
クラス
-
Benchmark
:: Tms (121) - BigDecimal (33)
- Bignum (33)
- CSV (22)
- Complex (115)
- Enumerator (29)
-
Enumerator
:: Chain (6) -
Enumerator
:: Lazy (75) -
Fiddle
:: Function (22) - Fixnum (30)
- Float (636)
- Integer (92)
- Matrix (132)
-
Matrix
:: EigenvalueDecomposition (11) - NilClass (11)
- Numeric (167)
- Object (11)
- OptionParser (132)
-
Process
:: Tms (44) - Random (66)
- Range (55)
- Rational (88)
- Set (11)
- String (66)
- StringIO (11)
- Time (80)
- Vector (77)
-
WEBrick
:: HTTPServer (11) -
WIN32OLE
_ TYPELIB (22) -
WIN32OLE
_ VARIANT (22)
モジュール
- Benchmark (11)
- BigMath (22)
- CMath (240)
- Enumerable (11)
- Fiddle (33)
-
GC
:: Profiler (11) - JSON (33)
-
JSON
:: Generator :: GeneratorMethods :: Float (11) - Kernel (77)
- Math (323)
- Newton (11)
- ObjectSpace (11)
- Process (11)
- SecureRandom (11)
キーワード
- % (28)
- * (39)
- ** (39)
- + (39)
- - (61)
- -@ (22)
-
/ (49) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - < (11)
- <= (11)
- <=> (11)
- == (11)
- >= (11)
-
ALIGN
_ FLOAT (11) - BigDecimal (22)
- Converters (11)
- DIG (11)
- E (11)
- EPSILON (11)
- Float (11)
- INFINITY (11)
- Infinity (11)
-
MANT
_ DIG (11) - MAX (11)
-
MAX
_ 10 _ EXP (11) -
MAX
_ EXP (11) - MIN (11)
-
MIN
_ 10 _ EXP (11) -
MIN
_ EXP (11) - Marshal フォーマット (11)
- MinusInfinity (11)
- NAN (11)
-
NEWS for Ruby 2
. 4 . 0 (8) - NaN (11)
- Numeric (11)
- PI (11)
- RADIX (11)
- ROUNDS (7)
-
SIZEOF
_ FLOAT (11) -
TYPE
_ FLOAT (11) - []= (11)
- abs (22)
- acos (17)
- acos! (6)
- acosh (17)
- acosh! (6)
- angle (22)
-
angle
_ with (11) - arg (22)
- asin (17)
- asin! (6)
- asinh (17)
- asinh! (6)
- at (47)
- atan (17)
- atan! (6)
- atan2 (17)
- atan2! (6)
- atanh (17)
- atanh! (6)
- bigdecimal (11)
- bsearch (22)
- call (11)
- cbrt (17)
- cbrt! (6)
- ceil (15)
- classify (11)
-
clock
_ gettime (11) - coerce (11)
- cofactor (11)
-
cofactor
_ expansion (11) - converters (11)
- cos (17)
- cos! (6)
- cosh (17)
- cosh! (6)
- cstime (22)
- cutime (22)
- denominator (22)
- det (11)
-
det
_ e (11) - determinant (11)
-
determinant
_ e (11) - div (17)
- divmod (11)
- dot (11)
-
double
_ fig (11) - each (22)
- eigenvalues (11)
-
elements
_ to _ f (22) -
enum
_ for (22) - eql? (11)
- erf (11)
- erfc (11)
- exp (28)
- exp! (6)
- fdiv (50)
- finite? (27)
- floor (16)
- format (11)
- frexp (11)
- gamma (11)
- grep (11)
-
grep
_ v (9) - hash (11)
- hex (11)
- hypot (11)
- infinite? (27)
-
inner
_ product (11) - inspect (22)
-
laplace
_ expansion (11) - lazy (22)
- ldexp (11)
- lgamma (11)
- log (45)
- log! (12)
- log10 (17)
- log10! (6)
- log2 (17)
- log2! (6)
- magnitude (33)
- memberwise (11)
- modulo (17)
- nan? (11)
- negative? (9)
- new (62)
-
next
_ float (10) - norm (22)
- numerator (22)
- oct (11)
- on (132)
-
parse
_ csv (11) - phase (22)
- positive? (9)
- pow (22)
-
prev
_ float (10) - putc (11)
- quo (22)
- r (11)
- rand (88)
-
random
_ number (11) - rank (11)
- rationalize (22)
-
reachable
_ objects _ from (11) - real (11)
- realtime (11)
- remainder (3)
- round (34)
- rsqrt (4)
-
ruby 1
. 6 feature (11) - sin (17)
- sin! (6)
-
singleton
_ class (11) - sinh (17)
- sinh! (6)
- size (28)
- split (11)
- sprintf (11)
- sprintf フォーマット (11)
- sqrt (17)
- sqrt! (6)
- step (84)
- stime (22)
- tan (17)
- tan! (6)
- tanh (17)
- tanh! (6)
-
to
_ d (22) -
to
_ enum (22) -
to
_ f (94) -
to
_ i (22) -
to
_ json (11) -
to
_ r (11) -
to
_ s (22) - total (11)
-
total
_ time (11) - tr (11)
- trace (11)
- truncate (15)
- utime (22)
- version (11)
- zero? (11)
- 正規表現 (11)
検索結果
先頭5件
-
Float
# round(ndigits = 0) -> Integer | Float (9219.0) -
自身ともっとも近い整数もしくは実数を返します。
...# => 1
1.2.round # => 1
(-1.2).round # => -1
(-1.5).round # => -2
t = Math::PI # => 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
:: INFINITY -> Float (9219.0) -
浮動小数点数における正の無限大です。
...浮動小数点数における正の無限大です。
負の無限大は -Float::INFINITY です。
@see Float#finite?, Float#infinite?... -
Float
:: EPSILON -> Float (9217.0) -
1.0 + Float::EPSILON != 1.0 となる最小の正の値です。
...1.0 + Float::EPSILON != 1.0 となる最小の正の値です。
通常はデフォルトで 2.2204460492503131e-16 です。... -
Float
# floor(ndigits = 0) -> Integer | Float (9213.0) -
自身と等しいかより小さな整数のうち最大のものを返します。
...Float を返します。
小数点以下を、最大 n 桁にします。
負の整数を指定した場合、Integer を返します。
小数点位置から左に少なくとも n 個の 0 が並びます。
//emlist[例][ruby]{
1.2.floor # => 1
2......# => 2
(-1.2).floor # => -2
(-2.0).floor # => -2
1.234567.floor(2) # => 1.23
1.234567.floor(3) # => 1.234
1.234567.floor(4) # => 1.2345
1.234567.floor(5) # => 1.23456
34567.89.floor(-5) # => 0
34567.89.floor(-4) # => 30000
34567.89.floor(-3) # => 34000
34567.89.floor(-2) # => 345......00
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 (9207.0) -
小数点以下を切り捨てて値を整数に変換します。
...。
@param ndigits 10進数での小数点以下の有効桁数を整数で指定します。
正の整数を指定した場合、Float を返します。
小数点以下を、最大 n 桁にします。
負の整数を指定した場合、Integer を返......す。
小数点位置から左に少なくとも n 個の 0 が並びます。
//emlist[例][ruby]{
2.8.truncate # => 2
(-2.8).truncate # => -2
1.234567.truncate(2) # => 1.23
34567.89.truncate(-2) # => 34500
//}
@see Numeric#round, Numeric#ceil, Numeric#floor... -
Float
:: NAN -> Float (9207.0) -
浮動小数点数における NaN(Not a number)です。
...浮動小数点数における NaN(Not a number)です。
@see Float#nan?... -
Float
# angle -> 0 | Float (9203.0) -
自身の偏角(正の数なら 0、負の数なら Math::PI)を返します。
...自身の偏角(正の数なら 0、負の数なら Math::PI)を返します。
//emlist[例][ruby]{
1.arg # => 0
-1.arg # => 3.141592653589793
//}
ただし、自身が NaN(Not a number) であった場合は、NaN を返します。... -
Float
# arg -> 0 | Float (9203.0) -
自身の偏角(正の数なら 0、負の数なら Math::PI)を返します。
...自身の偏角(正の数なら 0、負の数なら Math::PI)を返します。
//emlist[例][ruby]{
1.arg # => 0
-1.arg # => 3.141592653589793
//}
ただし、自身が NaN(Not a number) であった場合は、NaN を返します。... -
Float
# phase -> 0 | Float (9203.0) -
自身の偏角(正の数なら 0、負の数なら Math::PI)を返します。
...自身の偏角(正の数なら 0、負の数なら Math::PI)を返します。
//emlist[例][ruby]{
1.arg # => 0
-1.arg # => 3.141592653589793
//}
ただし、自身が NaN(Not a number) であった場合は、NaN を返します。... -
Float
# %(other) -> Float (9202.0) -
算術演算子。剰余を計算します。
...算術演算子。剰余を計算します。
@param other 二項演算の右側の引数(対象)
//emlist[例][ruby]{
# 剰余
3.0 % 1.2 # => 0.6000000000000001
3.0 % 0.0 # ZeroDivisionError
//}... -
Float
# abs -> Float (9202.0) -
自身の絶対値を返します。
...自身の絶対値を返します。
//emlist[例][ruby]{
34.56.abs # => 34.56
-34.56.abs # => 34.56
//}...