Ruby | Numeric coerce() function
The coerce() is an inbuilt method in Ruby returns an array containing two numbers containing two float numbers.
Parameters: The function needs a number and ndigits to which the precision of decimal digits is kept. In case no ndigits is passed it takes 0 to be the default value.
Return Value: It returns the smallest number which is greater than or equal to the given number by keeping a precision of n digits of the decimal part.