abstract struct Number
- Number
- Value
- Object
Overview
The top-level number type.
Included Modules
- Comparable(BigFloat)
- Comparable(Number)
- Steppable
Defined in:
ext/number.crInstance Method Summary
-
#bit
Return a
MemoryConversion::Bits
which has this number of bits. -
#bits
Return a
MemoryConversion::Bits
which has this number of bits. -
#byte
Return a
MemoryConversion::Bytes
which has this number of bytes. -
#bytes
Return a
MemoryConversion::Bytes
which has this number of bytes. -
#exabit
Return a
MemoryConversion::Bits
which has this number of Exabits. -
#exabits
Return a
MemoryConversion::Bits
which has this number of Exabits. -
#exabyte
Return a
MemoryConversion::Bytes
which has this number of Exabytes. -
#exabytes
Return a
MemoryConversion::Bytes
which has this number of Exabytes. -
#gigabit
Return a
MemoryConversion::Bits
which has this number of Gigabits. -
#gigabits
Return a
MemoryConversion::Bits
which has this number of Gigabits. -
#gigabyte
Return a
MemoryConversion::Bytes
which has this number of Gigabytes. -
#gigabytes
Return a
MemoryConversion::Bytes
which has this number of Gigabytes. -
#kilobit
Return a
MemoryConversion::Bits
which has this number of kilobits. -
#kilobits
Return a
MemoryConversion::Bits
which has this number of kilobits. -
#kilobyte
Return a
MemoryConversion::Bytes
which has this number of kilobytes. -
#kilobytes
Return a
MemoryConversion::Bytes
which has this number of kilobytes. -
#megabit
Return a
MemoryConversion::Bits
which has this number of Megabits. -
#megabits
Return a
MemoryConversion::Bits
which has this number of Megabits. -
#megabyte
Return a
MemoryConversion::Bytes
which has this number of Megabytes. -
#megabytes
Return a
MemoryConversion::Bytes
which has this number of Megabytes. -
#petabit
Return a
MemoryConversion::Bits
which has this number of Petabits. -
#petabits
Return a
MemoryConversion::Bits
which has this number of Petabits. -
#petabyte
Return a
MemoryConversion::Bytes
which has this number of Petabytes. -
#petabytes
Return a
MemoryConversion::Bytes
which has this number of Petabytes. -
#storage_byte
Return a
MemoryConversion::Bytes
which has this number of bytes, as measured by storage manufacturers (i.e. -
#storage_bytes
Return a
MemoryConversion::Bytes
which has this number of bytes, as measured by storage manufacturers (i.e. -
#storage_exabyte
Return a
MemoryConversion::Bytes
which has this number of Exabytes, as measured by storage manufacturers (i.e. -
#storage_exabytes
Return a
MemoryConversion::Bytes
which has this number of Exabytes, as measured by storage manufacturers (i.e. -
#storage_gigabyte
Return a
MemoryConversion::Bytes
which has this number of Gigabytes, as measured by storage manufacturers (i.e. -
#storage_gigabytes
Return a
MemoryConversion::Bytes
which has this number of Gigabytes, as measured by storage manufacturers (i.e. -
#storage_kilobyte
Return a
MemoryConversion::Bytes
which has this number of kilobytes, as measured by storage manufacturers (i.e. -
#storage_kilobytes
Return a
MemoryConversion::Bytes
which has this number of kilobytes, as measured by storage manufacturers (i.e. -
#storage_megabyte
Return a
MemoryConversion::Bytes
which has this number of Megabytes, as measured by storage manufacturers (i.e. -
#storage_megabytes
Return a
MemoryConversion::Bytes
which has this number of Megabytes, as measured by storage manufacturers (i.e. -
#storage_petabyte
Return a
MemoryConversion::Bytes
which has this number of Petabytes, as measured by storage manufacturers (i.e. -
#storage_petabytes
Return a
MemoryConversion::Bytes
which has this number of Petabytes, as measured by storage manufacturers (i.e. -
#storage_terabyte
Return a
MemoryConversion::Bytes
which has this number of Terabytes, as measured by storage manufacturers (i.e. -
#storage_terabytes
Return a
MemoryConversion::Bytes
which has this number of Terabytes, as measured by storage manufacturers (i.e. -
#storage_yottabyte
Return a
MemoryConversion::Bytes
which has this number of Yottabytes, as measured by storage manufacturers (i.e. -
#storage_yottabytes
Return a
MemoryConversion::Bytes
which has this number of Yottabytes, as measured by storage manufacturers (i.e. -
#storage_zettabyte
Return a
MemoryConversion::Bytes
which has this number of Zettabytes, as measured by storage manufacturers (i.e. -
#storage_zettabytes
Return a
MemoryConversion::Bytes
which has this number of Zettabytes, as measured by storage manufacturers (i.e. -
#terabit
Return a
MemoryConversion::Bits
which has this number of Terabits. -
#terabits
Return a
MemoryConversion::Bits
which has this number of Terabits. -
#terabyte
Return a
MemoryConversion::Bytes
which has this number of Terabytes. -
#terabytes
Return a
MemoryConversion::Bytes
which has this number of Terabytes. -
#yottabit
Return a
MemoryConversion::Bits
which has this number of Yottabits. -
#yottabits
Return a
MemoryConversion::Bits
which has this number of Yottabits. -
#yottabyte
Return a
MemoryConversion::Bytes
which has this number of Yottabytes. -
#yottabytes
Return a
MemoryConversion::Bytes
which has this number of Yottabytes. -
#zettabit
Return a
MemoryConversion::Bits
which has this number of Zettabits. -
#zettabits
Return a
MemoryConversion::Bits
which has this number of Zettabits. -
#zettabyte
Return a
MemoryConversion::Bytes
which has this number of Zettabytes. -
#zettabytes
Return a
MemoryConversion::Bytes
which has this number of Zettabytes.
Instance Method Detail
Return a MemoryConversion::Bits
which has this number of bits.
one_bit = 1.bit # => MemoryConversion::Bits(@value=1)
one_bit.to_bits # => 1_f64
Return a MemoryConversion::Bits
which has this number of bits.
one_bit = 1.bit # => MemoryConversion::Bits(@value=1)
one_bit.to_bits # => 1_f64
Return a MemoryConversion::Bytes
which has this number of bytes.
one_byte = 1.byte # => MemoryConversion::Bytes(@value=1)
one_byte.to_bytes # => 1_f64
Return a MemoryConversion::Bytes
which has this number of bytes.
one_byte = 1.byte # => MemoryConversion::Bytes(@value=1)
one_byte.to_bytes # => 1_f64
Return a MemoryConversion::Bits
which has this number of Exabits.
one_exabit = 1.exabit # => MemoryConversion::Bits(@value=0)
one_exabit.to_bits # => 0_f64
Return a MemoryConversion::Bits
which has this number of Exabits.
one_exabit = 1.exabit # => MemoryConversion::Bits(@value=0)
one_exabit.to_bits # => 0_f64
Return a MemoryConversion::Bytes
which has this number of Exabytes.
one_exabyte = 1.exabyte # => MemoryConversion::Bytes(@value=0)
one_exabyte.to_bytes # => 0_f64
Return a MemoryConversion::Bytes
which has this number of Exabytes.
one_exabyte = 1.exabyte # => MemoryConversion::Bytes(@value=0)
one_exabyte.to_bytes # => 0_f64
Return a MemoryConversion::Bits
which has this number of Gigabits.
one_gigabit = 1.gigabit # => MemoryConversion::Bits(@value=1073741824)
one_gigabit.to_bits # => 1073741824_f64
Return a MemoryConversion::Bits
which has this number of Gigabits.
one_gigabit = 1.gigabit # => MemoryConversion::Bits(@value=1073741824)
one_gigabit.to_bits # => 1073741824_f64
Return a MemoryConversion::Bytes
which has this number of Gigabytes.
one_gigabyte = 1.gigabyte # => MemoryConversion::Bytes(@value=1073741824)
one_gigabyte.to_bytes # => 1073741824_f64
Return a MemoryConversion::Bytes
which has this number of Gigabytes.
one_gigabyte = 1.gigabyte # => MemoryConversion::Bytes(@value=1073741824)
one_gigabyte.to_bytes # => 1073741824_f64
Return a MemoryConversion::Bits
which has this number of kilobits.
one_kilobit = 1.kilobit # => MemoryConversion::Bits(@value=1024)
one_kilobit.to_bits # => 1024_f64
Return a MemoryConversion::Bits
which has this number of kilobits.
one_kilobit = 1.kilobit # => MemoryConversion::Bits(@value=1024)
one_kilobit.to_bits # => 1024_f64
Return a MemoryConversion::Bytes
which has this number of kilobytes.
one_kilobyte = 1.kilobyte # => MemoryConversion::Bytes(@value=1024)
one_kilobyte.to_bytes # => 1024_f64
Return a MemoryConversion::Bytes
which has this number of kilobytes.
one_kilobyte = 1.kilobyte # => MemoryConversion::Bytes(@value=1024)
one_kilobyte.to_bytes # => 1024_f64
Return a MemoryConversion::Bits
which has this number of Megabits.
one_megabit = 1.megabit # => MemoryConversion::Bits(@value=1048576)
one_megabit.to_bits # => 1048576_f64
Return a MemoryConversion::Bits
which has this number of Megabits.
one_megabit = 1.megabit # => MemoryConversion::Bits(@value=1048576)
one_megabit.to_bits # => 1048576_f64
Return a MemoryConversion::Bytes
which has this number of Megabytes.
one_megabyte = 1.megabyte # => MemoryConversion::Bytes(@value=1048576)
one_megabyte.to_bytes # => 1048576_f64
Return a MemoryConversion::Bytes
which has this number of Megabytes.
one_megabyte = 1.megabyte # => MemoryConversion::Bytes(@value=1048576)
one_megabyte.to_bytes # => 1048576_f64
Return a MemoryConversion::Bits
which has this number of Petabits.
one_petabit = 1.petabit # => MemoryConversion::Bits(@value=0)
one_petabit.to_bits # => 0_f64
Return a MemoryConversion::Bits
which has this number of Petabits.
one_petabit = 1.petabit # => MemoryConversion::Bits(@value=0)
one_petabit.to_bits # => 0_f64
Return a MemoryConversion::Bytes
which has this number of Petabytes.
one_petabyte = 1.petabyte # => MemoryConversion::Bytes(@value=0)
one_petabyte.to_bytes # => 0_f64
Return a MemoryConversion::Bytes
which has this number of Petabytes.
one_petabyte = 1.petabyte # => MemoryConversion::Bytes(@value=0)
one_petabyte.to_bytes # => 0_f64
Return a MemoryConversion::Bytes
which has this number of bytes,
as measured by storage manufacturers (i.e. powers of 10).
one_byte = 1.byte # => MemoryConversion::Bytes(@value=1)
one_byte.to_bytes # => 1_f64
Return a MemoryConversion::Bytes
which has this number of bytes,
as measured by storage manufacturers (i.e. powers of 10).
one_byte = 1.byte # => MemoryConversion::Bytes(@value=1)
one_byte.to_bytes # => 1_f64
Return a MemoryConversion::Bytes
which has this number of Exabytes,
as measured by storage manufacturers (i.e. powers of 10).
one_exabyte = 1.exabyte # => MemoryConversion::Bytes(@value=1000000)
one_exabyte.to_bytes # => 1000000_f64
Return a MemoryConversion::Bytes
which has this number of Exabytes,
as measured by storage manufacturers (i.e. powers of 10).
one_exabyte = 1.exabyte # => MemoryConversion::Bytes(@value=1000000)
one_exabyte.to_bytes # => 1000000_f64
Return a MemoryConversion::Bytes
which has this number of Gigabytes,
as measured by storage manufacturers (i.e. powers of 10).
one_gigabyte = 1.gigabyte # => MemoryConversion::Bytes(@value=1000)
one_gigabyte.to_bytes # => 1000_f64
Return a MemoryConversion::Bytes
which has this number of Gigabytes,
as measured by storage manufacturers (i.e. powers of 10).
one_gigabyte = 1.gigabyte # => MemoryConversion::Bytes(@value=1000)
one_gigabyte.to_bytes # => 1000_f64
Return a MemoryConversion::Bytes
which has this number of kilobytes,
as measured by storage manufacturers (i.e. powers of 10).
one_kilobyte = 1.kilobyte # => MemoryConversion::Bytes(@value=10)
one_kilobyte.to_bytes # => 10_f64
Return a MemoryConversion::Bytes
which has this number of kilobytes,
as measured by storage manufacturers (i.e. powers of 10).
one_kilobyte = 1.kilobyte # => MemoryConversion::Bytes(@value=10)
one_kilobyte.to_bytes # => 10_f64
Return a MemoryConversion::Bytes
which has this number of Megabytes,
as measured by storage manufacturers (i.e. powers of 10).
one_megabyte = 1.megabyte # => MemoryConversion::Bytes(@value=100)
one_megabyte.to_bytes # => 100_f64
Return a MemoryConversion::Bytes
which has this number of Megabytes,
as measured by storage manufacturers (i.e. powers of 10).
one_megabyte = 1.megabyte # => MemoryConversion::Bytes(@value=100)
one_megabyte.to_bytes # => 100_f64
Return a MemoryConversion::Bytes
which has this number of Petabytes,
as measured by storage manufacturers (i.e. powers of 10).
one_petabyte = 1.petabyte # => MemoryConversion::Bytes(@value=100000)
one_petabyte.to_bytes # => 100000_f64
Return a MemoryConversion::Bytes
which has this number of Petabytes,
as measured by storage manufacturers (i.e. powers of 10).
one_petabyte = 1.petabyte # => MemoryConversion::Bytes(@value=100000)
one_petabyte.to_bytes # => 100000_f64
Return a MemoryConversion::Bytes
which has this number of Terabytes,
as measured by storage manufacturers (i.e. powers of 10).
one_terabyte = 1.terabyte # => MemoryConversion::Bytes(@value=10000)
one_terabyte.to_bytes # => 10000_f64
Return a MemoryConversion::Bytes
which has this number of Terabytes,
as measured by storage manufacturers (i.e. powers of 10).
one_terabyte = 1.terabyte # => MemoryConversion::Bytes(@value=10000)
one_terabyte.to_bytes # => 10000_f64
Return a MemoryConversion::Bytes
which has this number of Yottabytes,
as measured by storage manufacturers (i.e. powers of 10).
one_yottabyte = 1.yottabyte # => MemoryConversion::Bytes(@value=100000000)
one_yottabyte.to_bytes # => 100000000_f64
Return a MemoryConversion::Bytes
which has this number of Yottabytes,
as measured by storage manufacturers (i.e. powers of 10).
one_yottabyte = 1.yottabyte # => MemoryConversion::Bytes(@value=100000000)
one_yottabyte.to_bytes # => 100000000_f64
Return a MemoryConversion::Bytes
which has this number of Zettabytes,
as measured by storage manufacturers (i.e. powers of 10).
one_zettabyte = 1.zettabyte # => MemoryConversion::Bytes(@value=10000000)
one_zettabyte.to_bytes # => 10000000_f64
Return a MemoryConversion::Bytes
which has this number of Zettabytes,
as measured by storage manufacturers (i.e. powers of 10).
one_zettabyte = 1.zettabyte # => MemoryConversion::Bytes(@value=10000000)
one_zettabyte.to_bytes # => 10000000_f64
Return a MemoryConversion::Bits
which has this number of Terabits.
one_terabit = 1.terabit # => MemoryConversion::Bits(@value=0)
one_terabit.to_bits # => 0_f64
Return a MemoryConversion::Bits
which has this number of Terabits.
one_terabit = 1.terabit # => MemoryConversion::Bits(@value=0)
one_terabit.to_bits # => 0_f64
Return a MemoryConversion::Bytes
which has this number of Terabytes.
one_terabyte = 1.terabyte # => MemoryConversion::Bytes(@value=0)
one_terabyte.to_bytes # => 0_f64
Return a MemoryConversion::Bytes
which has this number of Terabytes.
one_terabyte = 1.terabyte # => MemoryConversion::Bytes(@value=0)
one_terabyte.to_bytes # => 0_f64
Return a MemoryConversion::Bits
which has this number of Yottabits.
one_yottabit = 1.yottabit # => MemoryConversion::Bits(@value=0)
one_yottabit.to_bits # => 0_f64
Return a MemoryConversion::Bits
which has this number of Yottabits.
one_yottabit = 1.yottabit # => MemoryConversion::Bits(@value=0)
one_yottabit.to_bits # => 0_f64
Return a MemoryConversion::Bytes
which has this number of Yottabytes.
one_yottabyte = 1.yottabyte # => MemoryConversion::Bytes(@value=0)
one_yottabyte.to_bytes # => 0_f64
Return a MemoryConversion::Bytes
which has this number of Yottabytes.
one_yottabyte = 1.yottabyte # => MemoryConversion::Bytes(@value=0)
one_yottabyte.to_bytes # => 0_f64
Return a MemoryConversion::Bits
which has this number of Zettabits.
one_zettabit = 1.zettabit # => MemoryConversion::Bits(@value=0)
one_zettabit.to_bits # => 0_f64
Return a MemoryConversion::Bits
which has this number of Zettabits.
one_zettabit = 1.zettabit # => MemoryConversion::Bits(@value=0)
one_zettabit.to_bits # => 0_f64
Return a MemoryConversion::Bytes
which has this number of Zettabytes.
one_zettabyte = 1.zettabyte # => MemoryConversion::Bytes(@value=0)
one_zettabyte.to_bytes # => 0_f64
Return a MemoryConversion::Bytes
which has this number of Zettabytes.
one_zettabyte = 1.zettabyte # => MemoryConversion::Bytes(@value=0)
one_zettabyte.to_bytes # => 0_f64