RWG's regular polygon message reminded me of a programming problem --
I never got a satisfying solution to this:
An elliptical orbit has several parameters defining its size and shape,
(major axis, eccentricity, period)
and a few more that fix its position relative to the central body
(inclination, longitude of the ascending node, ...).
There are lots of alternative choices for the parameters
(minor axis, semi-major-axis, latus rectum, average distance, ...),
and a bunch of equations relating them.
I wanted a routine that would take an orbit that was specified by
some of these parameters, and compute all the others. The obvious
solution, which I eventually adopted, was to first compute a set
of standard parameters from whatever was given, then do all the
others. The unsatisfactory part is that my data were real numbers
of varying accuracy, ranges really, and I wanted to reflect the
input accuracy into the computed other parameters. The problems
appear when an input is used multiple times, perhaps implicitly,
as part of computing another parameter: the accuracy ranges become
too pessimistic.
The ad hoc answer is to develop a separate order of calculation
for each possible set of supplied input parameters, essentially
solving each possible problem independently, and writing code to
match. This is adequate from a logic viewpoint -- it will produce
correct answers -- but a mess in terms of total effort, and
somewhat bug-prone and expensive to test.
Any thoughts?
You have a set of relationships among a bunch of variables, and want
to calculate from any set to the others, correctly preserving ranges.
In the case of the orbit equations, most of the relationships are
simple products of powers, or at least monotone, so the answers
should be well defined.
---
RWG: Can your matrices of Q-products explain why Unequal-Partitions(N)
has so many powers of 2 divisors? The most egregious values (from A&S
table 24.5 on page 836) are Q(20) = 64, Q(34) = 512, Q(45) = 2048.
There are occasional odd Q(N), but no apparent pattern.
Rich rcs(a)cs.arizona.edu