Isn't the choice of the representation for #: result a lot like picking the principle root?
%:*:_2 2 *:%:_2 _2 The solution to the first expression above should really be _2 2 but, though more correct, is impractical in actual problem solving. A similar thing occurs with circular functions. 1 o.0.5+0,o.2 0.479426 0.479426 And that is why many proofs restrict functions to be single valued. On Wed, Dec 14, 2011 at 9:18 PM, Marshall Lochbaum <mwlochb...@gmail.com>wrote: > antibase2 has an inverse only for nonnegative numbers, given by #. > twoscomplement's inverse is [:#. (* _1^0=i.@#)"1 > signwithbits has inverse #. > > Marshall > > On Wed, Dec 14, 2011 at 11:10 PM, Kip Murray <k...@math.uh.edu> wrote: > > > Thank you, Raul. May we have inverses? > > > > On 12/14/2011 9:13 AM, Raul Miller wrote: > > > The subject line of this thread is arguably wrong -- there are a > > > variety of "good ways" of decomposing integers to binary. > > > > > > That said, it's interesting to think about the various proposals > > > expressed in terms similar to those which could be used to implement > > > monadic #: > > > > > > antibase2=: #:~ 2 #~ 1 + 2<.@^. 1>.>./@,@:|@:<. > > > twoscomplement=: #:~ 2 #~ 1 + 2<.@^. 1 +>./@,@:|@:<. > > > signwithbits=: #:~ 0, 2 #~ 1 + 2<.@^. 1>.>./@,@:|@:<. > > > > > > (In all cases the #: here is dyadic, so these definitions are > > > independent of the definition of monadic #:) > > > > > > antibase2 i: 3 > > > 0 1 > > > 1 0 > > > 1 1 > > > 0 0 > > > 0 1 > > > 1 0 > > > 1 1 > > > twoscomplement i: 3 > > > 1 0 1 > > > 1 1 0 > > > 1 1 1 > > > 0 0 0 > > > 0 0 1 > > > 0 1 0 > > > 0 1 1 > > > signwithbits i: 3 > > > _1 0 1 > > > _1 1 0 > > > _1 1 1 > > > 0 0 0 > > > 0 0 1 > > > 0 1 0 > > > 0 1 1 > > > > > > There's also (* * #:) but that one assumes the antibase2 > > implementation... > > > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm