Skip to content

Tag Archives: Ruby Numeric-class

The floor() is an inbuilt method in Ruby returns a number less than or equal to the given number with a precision of the given… Read More
The zero?() is an inbuilt method in Ruby returns a boolean value. It returns true if the number is a negative one, else it returns… Read More
The real?() is an inbuilt method in Ruby returns a boolean value. It returns true if the number is a negative one, else it returns… Read More
The positive?() is an inbuilt method in Ruby returns a boolean value. It returns true if the number is a npositive one, else it returns… Read More
The negative?() is an inbuilt method in Ruby returns a boolean value. It returns true if the number is a negative one, else it returns… Read More
The integer?() is an inbuilt method in Ruby returns a boolean value. It returns true if the number is an integer one, else it returns… Read More
The fdiv() is an inbuilt method in Ruby returns the result after performing a float division. Syntax: num1.fdiv(num2) Parameters: The function needs two numbers whose… Read More
The i() is an inbuilt method in Ruby returns a complex number with the imaginary part that is given. Syntax: num.i() Parameters: The function needs… Read More
The imaginary() is an inbuilt method in Ruby returns the imaginary part of the given number. Syntax: num.imaginary() Parameters: The function needs a number whose… Read More
The imag() is an inbuilt method in Ruby returns the imag part of the given number. Syntax: num.imag() Parameters: The function needs a number whose… Read More
The dup() is an inbuilt method in Ruby returns the number itself. Syntax: num1.dup() Parameters: The function needs a number.  Return Value: It returns itself… Read More
The % is an inbuilt method in Ruby returns the modular value when two numbers are divided. It returns the value of a % b. … Read More
The modulo() is an inbuilt method in Ruby returns the modular value when two numbers are divided. It returns the value of a modulo b.… Read More
The + is an inbuilt method in Ruby returns the addition of two numbers. It returns a + b. Syntax: a + b  Parameters: The… Read More
The – is an inbuilt method in Ruby returns the subtraction of two numbers. It returns a – b. Syntax: a – b  Parameters: The… Read More