Ruby | Numeric conj() function Last Updated : 19 Mar, 2024 Summarize Comments Improve Suggest changes Share Like Article Like Report 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() # Prints conj() of num puts num Output: 1.7 Example 2: Ruby # Ruby program for conj() method in Numeric # Initialize a number num1 = 19 # Function used num = num1.conj() # Prints conj() of num puts num Output: 19 Comment More infoAdvertise with us Next Article Ruby | Numeric coerce() function G gopaldave Follow Improve Article Tags : Ruby Ruby-Methods Ruby Numeric-class Similar Reads Ruby | Numeric conjugate() function 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.c 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 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 to be returned as complex. Return Value: It returns the complex number. Example 1: Ruby # Ruby program for to_c() # method in Numeric # Initialize a nu 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 floor() function 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 number of digits after the decimal point. In case the number of digits is not given, the default value is taken to be zero. Syntax: num.floor(ndigits) Parameters: The functi 1 min read Ruby | Matrix conj() function The conj() is an inbuilt method in Ruby returns the conjugate matrix. Syntax: mat1.conj() Parameters: The function does not accepts any parameter. Return Value: It returns the conjugate matrix. Example 1: Ruby # Ruby program for conj() method in Matrix # Include matrix require "matrix" # I 1 min read Like