At 15:59 +0100 11/14/05, Michele Dondi wrote: >I must say that I didn't follow the discussion (complex) very much. But this >makes me think of this too: the two representations are handy for different >calculations. It would be nice if they somehow declared what they can do >better (or at all) and have the "union" take care of which one's methods to >use. > >In another situation, one may implement a system for doing integer arithmetics >say in base twelve, and in this case one may have an "union" to decide to use >its .division() method to perform division by three, possibly holding a flag >telling that the most accurate status is that held in it.
Someday I may become competent to think in perl6 but if we're expanding on the topic. . . Complex numbers are much like 2-D vectors, the real ones and not the ordered lists that are used with hyper operators. A union structure that allows for 3-D vectors some of which are pseudovectors would be interesting. It would also be possible to represent vectors in 3-D spherical coordinates. Oh. . . A pseudovector differs from a vector in that it doesn't change direction when reflected in a plane mirror. The cross product of two ordinary vectors is a pseudovector. So is a magnetic field. As for complex operations which have multiple results I think a principle value approach makes more sense than a list. It's well established for the inverse trigonometric functions. Leave RootOf( ) to Maple and Mathematica. -- --> Halloween == Oct 31 == Dec 25 == Christmas <--