# Tag Archives: Ruby Numeric-class

## Ruby | Numeric truncate() function

The truncate() is an inbuilt method in Ruby returns a number rounded toward zero with a precision of the given number of digits after the… Read More »

## Ruby | Numeric to_int() function

The to_int() is an inbuilt method in Ruby returns the integer part of the given number. Syntax: num.to_int() Parameters: The function needs the number whose… Read More »

## Ruby | Numeric to_c() function

The to_c() is an inbuilt method in Ruby returns a complex number with the num. Syntax: num.to_c() Parameters: The function needs the number which is… Read More »

## Ruby | Numeric round() function

The round() is an inbuilt method in Ruby returns a number rounded to a number nearest to the given number with a precision of the… Read More »

## Ruby | Numeric remainder() function

The remainder() is an inbuilt method in Ruby returns the remainder when num1 is divided by num2. Syntax: num1.remainder(num2) Parameters: The function needs num1 and… Read More »

## Ruby | Numeric rectangular() function

The rectangular() is an inbuilt method in Ruby returns an array which consists of a real and an imaginary number. Syntax: num.rectangular() Parameters: The function… Read More »

## Ruby | Numeric rect() function

The rect() is an inbuilt method in Ruby returns an array which consists of a real and an imaginary number. Syntax: num.rect() Parameters: The function… Read More »

## Ruby | Numeric real() function

The real() is an inbuilt method in Ruby returns the real part of the given number. Syntax: num.real() Parameters: The function needs the number whose… Read More »

## Ruby | Numeric quo() function

The quo() is an inbuilt method in Ruby returns the most exact division, whether it be a float or a rational one. Syntax: num.quo() Parameters:… Read More »

## Ruby | Numeric phase() function

The phase() is an inbuilt method in Ruby returns 0 if the value is positive, else it returns a float value pi. Syntax: num.phase() Parameters:… Read More »

## Ruby | Numeric numerator() function

The numerator() is an inbuilt method in Ruby returns the numerator. Syntax: num.numerator() Parameters: The function needs a number which is to be checked. Return… Read More »

## Ruby | Numeric nonzero? function

The nonzero?() is an inbuilt method in Ruby returns self if the number is non-zero, else it returns nil. Syntax: num.nonzero?() Parameters: The function needs… Read More »

## Ruby | Numeric infinite? function

The infinite?() is an inbuilt method in Ruby returns nil if the number is finite. It returns -1 and +1 if the number is -infinity… Read More »

## Ruby | Numeric ceil() function

The ceil() is an inbuilt method in Ruby returns the smallest number which is greater than or equal to the given number by keeping a… Read More »

## Ruby | Numeric finite?() function

The finite?() is an inbuilt method in Ruby returns a boolean value. It returns true if the number is a finite one, else it returns… Read More »