Ruby | Numeric conjugate() function Last Updated : 19 Mar, 2024 Summarize Comments Improve Suggest changes Share Like Article Like Report The conjugate() is an inbuilt method in Ruby returns the number itself. Syntax: num1.conjugate() Parameters: The function needs a number. Return Value: It returns itself only. Example 1: CPP # Ruby program for conjugate() method in Matrix # Initialize a number num1 = 1.7 # Function used num = num1.conjugate() # Prints conjugate() of num puts num Output: 1.7 Example 2: CPP # Ruby program for conjugate() method in Matrix # Initialize a number num1 = 19 # Function used num = num1.conjugate() # Prints conjugate() of num puts num Output: 19 Comment More infoAdvertise with us Next Article Ruby | Numeric conj() function G gopaldave Follow Improve Article Tags : Ruby Ruby-Methods Ruby Numeric-class Similar Reads Ruby | Numeric conj() function The conj() is an inbuilt method in Ruby returns the number itself. Syntax: num1.conj() Parameters: The function needs a number. Return Value: It returns itself only. Example 1:  Ruby # Ruby program for conj() method in Numeric # Initialize a number num1 = 1.7 # Function used num = num1.conj() # P 1 min read Ruby | Matrix conjugate() function The conjugate() is an inbuilt method in Ruby returns the conjugate matrix. Syntax: mat1.conjugate() Parameters: The function does not accepts any parameter. Return Value: It returns the conjugate matrix.Example 1: Ruby # Ruby program for conjugate() method in Matrix # Include matrix require "matrix" 1 min read Ruby | Numeric coerce() function The coerce() is an inbuilt method in Ruby returns an array containing two numbers containing two float numbers. Syntax: num1.coerce(num2) 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 v 1 min read 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 false. Syntax: num.finite?() Parameters: The function needs a number which is to be checked for. Return Value: It returns returns a boolean value. Example 1: CPP # Ruby 1 min read 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 precision of n digits of the decimal part. Syntax: num.ceil(n digits) Parameters: The function needs a number and n digits to which the precision of decimal digits is 1 min read Ruby | Numeric abs() function The abs is an inbuilt method in Ruby returns the absolute value of a number.  Syntax: num.abs Parameters: The function needs the number whose absolute value is to be returned. Return Value: It returns the absolute value of a numbers. Example 1:  Ruby # Ruby program for abs() method in Numeric # I 1 min read Like