"Matthew" wrote:
0.61518624 = Current real value = 1,922,457 / 3,125,000
0.615384615 = Exactly 8/13 two significant denominator digits.
0.032% = difference express as a percentage.
Anything in the denominator 100 is statistical irrelevant
how can i get an excel cell to do this automatically?
Of course, Excel cannot do any computation "automatically". I think you are
asking how to write formulas to do what you need.
The question is: what exactly do you need?
So that everyone does not have to find and try to fathom
http://en.wikipedia.org/wiki/Orbital_resonance, perhaps you can explain how
you would do the above computation manually -- i.e. determining that 8/13 is
the closest rational number to the real number that you computed, within the
parameters that your specific (namely, denominator = 100).
Or did you just plunk that example from wiki page, and you have no idea
yourself?
A "dumb" way to do that is to write a UDF that tries all denominators (d) =
100 and all numerators (n) d to find the n/d that is closest to the given
real number (UDF argument). As bad as that might sound, it should be a very
fast computation on modern computers.
But is that what you are looking for: the closest rational number to the
real number?
(The percentage difference between the two is then a trivial Excel formula.)
----- original message -----
"Matthew" wrote in message
...
In a nut shell I am looking to display the margin of error from a
perfect fraction. So I can determine if a orbit is is too close to
being in perfect resonance and hence unstable.
0.61518624 = Current real value = 1,922,457 / 3,125,000
0.615384615 = Exactly 8/13 two significant denominator digits.
0.032% = difference express as a percentage.
Anything in the denominator 100 is statistical irrelevant
how can i get an excel cell to do this automatically?