How can I recover a number $n$ from its approximation $a$.
For example, if $n$ is $1.09861228866$, then $a$ can be $1.099$($N$ approximated value).
How can I implement a function $F$ that takes $a$, and possibly some other variables to output $n$.
My method
I find the percentage error $p$ of $a$ in reference to $n$. Then I define $F$ to take $a$, and $p$ as inputs.
With $p$, $F$ calculate the error $e$(the difference between $a$ and $n$), and adjust $a$ with $e$ to output $n$
The problem with my method
Sometimes the output of $F$ is very far from $n$ due to the fact that I also approximate the percentage error $p$.
Please how can I define $F$ better so that $F$ will always output $n$ when given $a$
And please note that all variables that $F$ takes will always be approximated to $x$ decimal places.
I've also read online that the probability of a question being ignored/down-voted here is very high, but please, if you will down vote this question, please give some pointers for a solution to this problem.
I really need to to define $F$. Thanks in advance.
Edit:
according to @lulu,
You can't recover n from its approximation, you've lost information. If you have something more specific in mind please add detail
Yeah I understand that approximating $n$ results to loss of information. That is why I used percentage error to define the lost information in my method. But the percentage error is not always effective, that's why I'm looking for a more effective way to represent the lost information.
I am afraid I find your concept absurd.
Taken to its logical conclusion you could store petabytes of data in a single byte. No problem, because with the ingenious algorithm you want us to supply, you could still recover it!
If such an algorithm existed, all the storage companies would have gone bust. The fact is that if you record $n$ to 1000 decimal places, but only store 5 decimal places - as you suggest in the comments - then the stored information would be useless for recovering the other 995 decimal places.
If such an algorithm existed it would not be limited to numerical data. You could convert all data to numerical data using standard algorithms and then use your magic algorithm.
Of course, significant compression is routinely used for storing image data, video data etc. But that is because the encoding schemes routinely used for displaying or manipulating such data are extremely inefficient. So one can often get compression up to 5-10x.
If you gave me 3.14159 and asked me to recover the next thousand digits, of course I could do it on the assumption that you had given me the first six digits of $\pi$. Similarly if you have me the first 20 words of a famous book or play, I could no doubt supply the rest. But for general data, where nothing is known about what was stored except the few bytes you did store, you cannot hope to recover the missing data.