BigDecimal#to_i() : to_i() is a BigDecimal class method which returns the value as an Integer. Syntax: BigDecimal.to_i() Parameter: BigDecimal values Return: the value as an… Read More
Category Archives: Ruby
BigDecimal#to_f() : to_f() is a BigDecimal class method which returns a new Float object having approximately the same value as the BigDecimal number. Syntax: BigDecimal.to_f()… Read More
BigDecimal#to_digits() : to_digits() is a BigDecimal class method which converts a Big decimal to string of the form “nnnnnn.mmm” Syntax: BigDecimal.to_digits() Parameter: BigDecimal values Return:… Read More
BigDecimal#to_d() : to_d() is a BigDecimal class method which returns the self of Big decimal. Syntax: BigDecimal.to_d() Parameter: BigDecimal values Return: the self of Big… Read More
BigDecimal#sub() : sub() is a BigDecimal class method which returns the subtraction using a specified value. Syntax: BigDecimal.sub() Parameter: BigDecimal values Return: the subtraction using… Read More
BigDecimal#sqrt() : sqrt() is a BigDecimal class method which returns the square root of the value. Syntax: BigDecimal.sqrt() Parameter: BigDecimal values Return: the square root… Read More
BigDecimal#split() : split() is a BigDecimal class method which splits a BigDecimal number into four parts, returned as an array of values. Syntax: BigDecimal.split() Parameter:… Read More
BigDecimal#log() : log() is a BigDecimal class method which returns the natural logarithm of decimal to the specified number of digits of precision, numeric. Syntax:… Read More
BigDecimal#cos() : cos() is a BigDecimal class method which returns the value of cosine to the specified number of digits of precision, numeric. Syntax: BigDecimal.cos()… Read More
BigDecimal#atan() : atan() is a BigDecimal class method which returns the value of arctangent to the specified number of digits of precision, numeric. Syntax: BigDecimal.atan()… Read More
BigDecimal#PI() : PI() is a BigDecimal class method which returns the value of pi to the specified number of digits of precision, numeric. Syntax: BigDecimal.PI()… Read More
BigDecimal#zero?() : zero?() is a BigDecimal class method which checks whether the Big decimal value is zero. Syntax: BigDecimal.zero?() Parameter: BigDecimal values Return: true –… Read More
BigDecimal#truncate() : truncate() is a BigDecimal class method which returns the Big decimal by truncating to the nearest integer (by default). Syntax: BigDecimal.truncate() Parameter: BigDecimal… Read More
BigDecimal#to_s() : to_s() is a BigDecimal class method which returns the value of Big decimal as a string. Syntax: BigDecimal.to_s() Parameter: BigDecimal values Return: the… Read More
Array#to_ary() : to_ary() is a Array class method which returns self array representation. Syntax: Array.to_ary() Parameter: Array Return: self array representation. Example #1 : #… Read More