Convert round decimal to (approximate) radical value?

I have done many random math programs to help me with my homework (synthetic separation is the funniest), and now I want to reverse the radical expression.

For example, in my handy TI calculator, I get

.2360679775 

Well, I want to convert this number to an equivalent irrational expression, which

 sqrt(5)-2 

I understand that I can go too far with this ... but it is fun and not so easy when you are considering a significant floating-point rounding error.

So how would you do that? Is there a trivial algorithm?

+6
language-agnostic math algorithm
source share
2 answers

Reverse Symbolic Calculator

(I was originally associated with this , which seems to be gone.)

+5
source share

Well, your example did not actually convert the input to an equivalent irrational expression , and the equivalent irrational expression a . As the inverse symbolic calculator shows, in your example there are many candidate irrational expressions within the tolerance of the decimal number, and the same number of irrational numbers will be indicated to any degree of validity of any decimal number. All this is due to the density of irrationalities along the number line.

So, to answer your questions:

  • I would limit myself to a few terms, such as sqrt (2), sqrt (3), sqrt (small primes), e, pi and integers, plus rationals with small dash denominators and approximate decimal numbers with several terms based on these four main arithmetic operators;
  • Is this algorithm trivial? You decide. In general, I think that it is impossible to find an algorithm for determining the canonical representation of any decimal fraction as a series of irrational terms and integers for the simple reason that such a canonical representation does not exist.

But then my real and irrational mathematics is very rusty, I look forward to evidence that I am wrong and encounters examples.

+1
source share

All Articles