Answer the question
In order to leave comments, you need to log in
How do you know if a number is irrational?
It is necessary to determine whether the number is irrational or not.
How can I do that?
Answer the question
In order to leave comments, you need to log in
Pfft, I don't understand what to talk about here:
1. We take an expression like 2/3.
2. We perform division.
3. Enter into a variable.
4. We do an elementary check * of the number in the variable - is it infinite or not. If the variable has an infinite number, then it is irrational.
* Of course, this is only possible if you don't want to know how the computer represents numbers.
An irrational number can be represented as an infinite non-repeating decimal.
Despite the complete inadequacy of the question, you can still try to check this if the number is obtained through some formula. You can calculate the result of this formula with different accuracy (but they must be large) and if the results are different, then the number has more digits in its record than indicated. Then this number can be considered irrational. This approach probably has a lot of bugs, but in simple cases it should work
. In Java, this could be done using BigInteger.
Do you even have the slightest idea how computers represent numbers?
All numbers that a computer operates on are rational. You can, of course, use abstract concepts, like the root of 5, but that's different.
This is the number that cannot be represented as a fraction ...
Have you even tried to google?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question