るりまサーチ

最速Rubyリファレンスマニュアル検索!
107件ヒット [1-100件を表示] (0.026秒)

別のキーワード

  1. numeric step
  2. _builtin numeric
  3. numeric div
  4. numeric i
  5. numeric imag

検索結果

<< 1 2 > >>

Range#size -> Integer | Float::INFINITY | nil (18135.0)

範囲内の要素数を返します。始端、終端のいずれかのオブジェクトが Numeric のサブクラスのオブジェクトではない場合には nil を返します。

...を返します。始端、終端のいずれかのオブジェクトが
Numeric
のサブクラスのオブジェクトではない場合には nil を返します。

//emlist[例][ruby]{
(10..20).size # => 11
("a".."z").size # => nil
(-Float::INFINITY..Float::INFINITY).size # => Infinity
//}...

Numeric (6142.0)

数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。

...スです。Integer や Float などの数値クラス
Numeric のサブクラスとして実装されています。

演算や比較を行うメソッド(+, -, *, /, <=>)は Numeric のサブクラスで定義されま
す。Numeric で定義されているメソッドは、サブクラスで...
...提供されているメソッド
(+, -, *, /, %) を利用して定義されるものがほとんどです。
つまり Numeric で定義されているメソッドは、Numeric のサブクラスとして新たに数値クラスを定義した時に、
演算メソッド(+, -, *, /, %, <=>, coerce...
...thod_added | o - - - - - -
size
| - - o o - - -
Numeric
Integer Fixnum Bignum Float Rational Complex
-----...
...round | o o o o -
singleton_method_added | o - - - -
size
| - o - - -
step | o - - - -...

1.6.8から1.8.0への変更点(まとめ) (102.0)

1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))

...r|File::Stat/rdev_major>)) [new]
: ((<File::Stat#rdev_minor|File::Stat/rdev_minor>)) [new]

追加

=== Float

: ((<Numeric#to_int|Numeric/to_int>)) [new]
: ((<Float#to_int|Numeric/to_int>)) [new]

追加。

=== Hash

: ((<Hash#merge|Hash/merge>)) [new]
: ((<Hash#merge!|Hash/merge!>)) [new]...
...ror/name>)) [new]

追加

=== NilClass

: ((<NilClass#to_f|NilClass/to_f>)) [new]

追加

=== Numeric

: ((<Numeric#div|Numeric/div>)) [new]
: ((<Numeric#quo|Numeric/quo>)) [new]

追加 ((<ruby-dev:19423>))

((<ruby-dev:20962>))

* div - 整除(divmodの第一要...
...だそうです)

: ((<Range#size|Range/size>)) [obsolete]
: ((<Range#length|Range/length>)) [obsolete]

このメソッドはなくなりました。
((<ruby-talk:64479>)), ((<ruby-talk:72133>))

Range の要素数を得るには

p(("a".."z").to_a.size)

などとする必要...

Kernel#check_signedness(type, headers = nil, opts = nil) -> "signed" | "unsigned" | nil (64.0)

Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.

...signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.

If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS_OF_', follow...
...ger if the +type+ is
unsigned, or negative integer if the +type+ is signed.

For example, if size_t is defined as unsigned, then
check_signedness('size_t') would returned +1 and the
SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the
compiler, and SIGNEDNESS_OF_INT=-1 if check_si...

Kernel#check_signedness(type, headers = nil, opts = nil) { ... } -> "signed" | "unsigned" | nil (64.0)

Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.

...signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.

If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS_OF_', follow...
...ger if the +type+ is
unsigned, or negative integer if the +type+ is signed.

For example, if size_t is defined as unsigned, then
check_signedness('size_t') would returned +1 and the
SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the
compiler, and SIGNEDNESS_OF_INT=-1 if check_si...

絞り込み条件を変える

Ruby用語集 (36.0)

Ruby用語集 A B C D E F G I J M N O R S Y

...は、N#coerce さえ適切に定義しておけば、Integer 側を変更せずに N という
数値クラスを定義できる。

参照:Numeric#coerce

: CRuby
Ruby の処理系の一つ。C で実装されているのでこの名がある。

Matz により開発が始められた。...
...呼び出しとは関係が
なく、再定義もできない。
代入式「n = 1」における「=」は代入演算子である。
「str.size」「user&.name」といったメソッド呼び出しにおける
「.」「&.」も演算子である。
「[*0..9]」におけるいわゆ...
...らなる配列。
配列式としては % 記法で書くこともできる。

参照:d:spec/literal#percent

: 数値オブジェクト
Numeric
クラスのサブクラスのインスタンス。

: スクリプト
: script
いわゆる軽量言語のプログラムをこう呼ぶこと...

ruby 1.6 feature (30.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...<ruby-core:00019>))

: 2002-09-11: Queue#((<Queue/pop>))

Queue#pop に競合状態の問題がありました ((<ruby-dev:17223>))

: 2002-09-11: SizedQueue.new

引数に 0 以下を受けつけるバグが修正されました。

: 2002-09-05: ((<リテラル/式展開>))

stable snapshot...
...i586-linux]

: SizedQueue#deq, #shift
: SizedQueue#enq

追加(push, pop の別名)。これらが定義されていなかったため、enq などを
呼び出したときスーパークラス Queue の enq が実行されていました。

: 2002-09-11: ((<tempfile/Tempfile#size>))

追加...
...)

p(-1[-1])

=> ruby 1.6.5 (2001-09-19) [i586-linux]
1
=> ruby 1.6.5 (2001-11-01) [i586-linux]
1

: Numeric#remainder

((<ruby-bugs-ja:PR#110>))

p( 3.remainder(-3))
p(-3.remainder(3))

=> ruby 1.6.5 (2001-09-19) [i586-linux]...

NEWS for Ruby 2.4.0 (24.0)

NEWS for Ruby 2.4.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...le#refine 引数としてモジュールを許可するようになりました 12534
* Module.used_modules を追加 7418

* Numeric
* Numeric#finite?, Numeric#infinite? を追加 12039

* Process
* macOS 10.12 から導入された CLOCK_MONOTONIC_RAW_APPROX, CLOCK_UPTIME_RAW,...
...-16BE/LE, UTF-32BE/LE, ISO-8859-1~16 をサポートしています。
Variations are available with options. 10085
* String.new(capacity: size) 12024

* StringIO
* StringIO#gets, StringIO#readline, StringIO#each_line, StringIO#readlines
省略可能なキーワード引数 cho...

NEWS for Ruby 2.5.0 (18.0)

NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...e#define_method, Module#alias_method, Module#undef_method, Module#remove_method はパブリックメソッドになりました 14133

* Numeric
* Numeric#step は > で0と比較できない引数が与えられたときcoerce内部で発生したエラーを隠蔽しないようになりま...
...ithub.com/ruby/psych/pull/312

* rbconfig
* RbConfig::LIMITS is added to provide the limits of C types.
This is available when rbconfig/sizeof is loaded.

* ripper
* Ripper::EXPR_BEG and so on for Ripper#state.
* Ripper#state を追加。スキャナーの状態を伝えるた...
...ms.org/2017/10/09/2.6.14-released.html
* https://blog.rubygems.org/2017/08/27/2.6.13-released.html

* securerandom
* SecureRandom.alphanumeric を追加

* set
* Set#to_s を Set#inspect の別名として追加 13676
* Set#=== を Set#include? の別名として追加 13801...

NEWS for Ruby 3.0.0 (18.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...eql? are now defined and will return true for separate Proc instances if the procs were created from the same block. 14267
* Queue / SizedQueue
* Queue#pop, SizedQueue#push and related methods may now invoke the `block`/`unblock` scheduler hooks in a non-blocking context. 16786
* Ractor...
...pipe, no broken pipe error message will be shown now. 14413
* `TRUE`/`FALSE`/`NIL` constants are no longer defined.
* Integer#zero? overrides Numeric#zero? for optimization. 16961
* Enumerable#grep and Enumerable#grep_v when passed a Regexp and no block no longer modify Regexp.last_match. 17...
...low compilations.
* Memory view interface [EXPERIMENTAL]
* The memory view interface is a C-API set to exchange a raw memory area, such as a numeric array or a bitmap image, between extension libraries. The extension libraries can share also the metadata of the memory area that consists of the...

絞り込み条件を変える

bigdecimal (12.0)

bigdecimal は浮動小数点数演算ライブラリです。 任意の精度で 10 進表現された浮動小数点数を扱えます。

...) 数値に自動変換することはできません。
文字列を数値に自動変換したい場合は bigdecimal.c の
「/* #define ENABLE_NUMERIC_STRING */」のコメントを外してから、
再コンパイル、再インストールする必要があります。
文字列で数値を...
...exponent >= exp )
t = t.div(m57121,sig)
u = t.div(k,sig)
pi = pi + u
k = k + two
end
pi
end

if $0 == __FILE__
if ARGV.size == 1
puts "PI("+ARGV[0]+"):"
puts big_pi(ARGV[0].to_i)
else
puts "TRY: ruby pi.rb 1000"
end
end
//}

=== その他

以下のメソ...
<< 1 2 > >>