Ruby | Numeric conjugate() function Last Updated : 12 Jul, 2025 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 | Matrix conjugate() 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 | 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 | 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 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 Like