Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Python
21.3K+ articles
Experiences
16.6K+ articles
Interview Experiences
14.1K+ articles
JavaScript
12.2K+ articles
School Learning
11.5K+ articles
Java
10.8K+ articles
Ruby
1.2K+ articles
Ruby-Methods
926+ articles
Ruby Numeric-class
43 posts
Recent Articles
Popular Articles
Ruby | Numeric truncate() function
Last Updated: 19 March 2024
The truncate() is an inbuilt method in Ruby returns a number rounded toward zero with a precision of the given number of digits after the decimal point. In case the numbe...
read more
Ruby
Ruby-Methods
Ruby Numeric-class
Ruby | Numeric to_int() function
Last Updated: 19 March 2024
The to_int() is an inbuilt method in Ruby returns the integer part of the given number.Syntax: num.to_int()Parameters: The function needs the number whose integer part is...
read more
Ruby
Ruby-Methods
Ruby Numeric-class
Ruby | Numeric to_c() function
Last Updated: 19 March 2024
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 compl...
read more
Ruby
Ruby-Methods
Ruby Numeric-class
Ruby | Numeric round() function
Last Updated: 19 March 2024
The round() is an inbuilt method in Ruby returns a number rounded to a number nearest to the given number with a precision of the given number of digits after the decimal...
read more
Ruby
Ruby-Methods
Ruby Numeric-class
Ruby | Numeric remainder() function
Last Updated: 19 March 2024
The remainder() is an inbuilt method in Ruby returns the remainder when num1 is divided by num2. Syntax: num1.remainder(num2)Parameters: The function needs num1 and num2 ...
read more
Ruby
Ruby-Methods
Ruby Numeric-class
Ruby | Numeric rectangular() function
Last Updated: 19 March 2024
The rectangular() is an inbuilt method in Ruby returns an array which consists of a real and an imaginary number. Syntax: num.rectangular()Parameters: The function needs ...
read more
Ruby
Ruby-Methods
Ruby Numeric-class
Ruby | Numeric rect() function
Last Updated: 19 March 2024
The rect() is an inbuilt method in Ruby returns an array which consists of a real and an imaginary number. Syntax: num.rect()Parameters: The function needs the number who...
read more
Ruby
Ruby-Methods
Ruby Numeric-class
Ruby | Numeric real() function
Last Updated: 19 March 2024
The real() is an inbuilt method in Ruby returns the real part of the given number.Syntax: num.real()Parameters: The function needs the number whose real part is to be ret...
read more
Ruby
Ruby-Methods
Ruby Numeric-class
Ruby | Numeric quo() function
Last Updated: 19 March 2024
The quo() is an inbuilt method in Ruby returns the most exact division, whether it be a float or a rational one.Syntax: num.quo()Parameters: The function needs a number w...
read more
Ruby
Ruby-Methods
Ruby Numeric-class
Ruby | Numeric phase() function
Last Updated: 19 March 2024
The phase() is an inbuilt method in Ruby returns 0 if the value is positive, else it returns a float value pi.Syntax: num.phase()Parameters: The function needs a number w...
read more
Ruby
Ruby-Methods
Ruby Numeric-class
Ruby | Numeric numerator() function
Last Updated: 19 March 2024
The numerator() is an inbuilt method in Ruby returns the numerator.Syntax: num.numerator()Parameters: The function needs a number which is to be checked.Return Value: It ...
read more
Ruby
Ruby-Methods
Ruby Numeric-class
Ruby | Numeric nonzero? function
Last Updated: 19 March 2024
The nonzero?() is an inbuilt method in Ruby returns self if the number is non-zero, else it returns nil.Syntax: num.nonzero?()Parameters: The function needs a number whic...
read more
Ruby
Ruby-Methods
Ruby Numeric-class
Ruby | Numeric infinite? function
Last Updated: 19 March 2024
The infinite?() is an inbuilt method in Ruby returns nil if the number is finite. It returns -1 and +1 if the number is -infinity or +infinity.Syntax: num.infinite?()Para...
read more
Ruby
Ruby-Methods
Ruby Numeric-class
Ruby | Numeric ceil() function
Last Updated: 19 March 2024
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 pa...
read more
Ruby
Ruby-Methods
Ruby Numeric-class
Ruby | Numeric finite?() function
Last Updated: 19 March 2024
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:...
read more
Ruby
Ruby-Methods
Ruby Numeric-class
1
2
3
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !