Skip to content

Tag Archives: rational-numbers

The number system includes different types of numbers for example prime numbers, odd numbers, even numbers, rational numbers, whole numbers, etc. These numbers can be… Read More
This article is focused on discussing the proof that there is no rational number whose square is 2. Before starting the proof, let’s get familiar… Read More
Real numbers are simply the combination of rational and irrational numbers, in the number system. In general, all the arithmetic operations can be performed on… Read More
Irrational Numbers are the numbers that can not be expressed in the form of p/q where p and q are integers and q does not… Read More
Given two strings S and T representing non-negative rational numbers, the task is to check if the values of S and T are equal or… Read More
Rational Numbers are the most fundamental subset of the collection of all numbers. A rational number represents the fraction of two integers where the denominator… Read More
Real numbers are categorized into rational and irrational numbers respectively. Given two integers p and q, a rational number is of the form p/q, where… Read More
Rational numbers are the integers p and q expressed in the form of p/q where q>0. Rational numbers can be positive, negative or even zero.… Read More
Given rational numbers, the task is to find the maximum rational number. Examples:  Input : ra_num = {{1, 2}, {2, 3}, {3, 4}, {4, 5}};… Read More
Given an array of rational numbers, the task is to find the LCM of these numbers. Examples:  Input : vect[] = {2/7, 3/14, 5/3} Output… Read More
Given two Rational numbers, the task is to find the maximum of given two rational numbers. Examples :  Input : first = 3/4, second= 3/2… Read More
Given a rational number d, print the reduced fraction which gives d.Examples:  Input : d = 2.5 Output : 5/2 Explanation: 5/2 gives 2.5 which… Read More
This module provides support for rational number arithmetic. It allows to create a Fraction instance from integers, floats, numbers, decimals and strings. Fraction Instances :… Read More
A rational is represented as p/qb, for example 2/3. Given a sorted array of rational numbers, how to search an element using Binary Search. Use… Read More