The basic kvecth is: Can radix encoding be defined to be completely
consistent outside the
radix numbers (I >1) with _all_ of the properties the same?
Since it cannot, the kvetch is: what is the best alternative to be chosen?
I think that (as usual) J's implementors and designers have come up with a
pretty good pick.
(Even if I now or later find fluff to pick off it, as I usually do).
((Because: that is in the nature of language design: things and opinions
change and differ)).
On 6/4/07, Oleg Kobchenko <[EMAIL PROTECTED]> wrote:
Base representation is also done with #. and #:
But the inverse of #. and antibase #: don't work
as expected:
0.1 #. 1 2 3
3.21
0.1 #.^:_1] 3.21
0.1 0.1 0.1 #: 3.21
0 0 0.01
0.1 0.1 0.1 #. 0 0 0.01
0.01
_3 #. 1 2 0 2
_7
_3 #.^:_1] _7
_1 _1
_3 _3 _3 _3 #: _7
0 _1 _1 _1
_3 _3 _3 _3 #. 0 _1 _1 _1
_7
--- Arved Sandstrom <[EMAIL PROTECTED]> wrote:
> It's probably not as remarkable as it sounds. :-) The most basic
operation -
> that of doing _3b1202, or suchlike - will happen correctly even if the
> implementor only ever thinks of positive bases.
>
> You may have noted too that using a negative base in J will accommodate
a
> negative representation, as in _3b_121 = _4, and I do not believe that
this
> is conventional. If it was accepted it should probably mean
>
> +/ 9 _3 1 * _1 2 1 = _14
>
> anyway. But that is maybe leaving up to the user not to be stupid; for
> example in J601 you can do 2b222, and _5b879.
>
> Arved Sandstrom
>
> [ SNIP ]
> > Then I thought back to a math competition I was once in, where they
> > first had a speaker talk about a subject that the competitors
> > presumably had never been exposed to before, and then had us take a
> > test on the subject.
> >
> > The subject of the talk was negative bases. For example base negative
> > 3, where 120 is equal to
> >
> > 1*(-3)^2 + 2*(-3)^1 + 0*(-3)^0 = 3
> >
> > As an aside, one interesting aspect of negative bases is that you
> > never need to negate a number. For example, -7 = 1202.
> >
> > So having discovered that J seemingly handles arbitrary bases, I
> > tried negative bases, and sure enough, it works:
> >
> > _3b1202
> > _7
> >
> > _That_ was a pleasant surprise!
> >
> > regards,
> >
> > Geoff
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
____________________________________________________________________________________
Be a better Heartthrob. Get better relationship answers from someone who
knows. Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545433
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
Use Reply-To: & thread your email
after the first: or it may take a while, as
I get 2000 emails per day.
--
Roy A. Crabtree
UNC '76 gaa.lifer#
(For TN contact, email me to set up a confirmed date/time)
[When you hear/read/see/feel what a yehudi plays/writes/sculpts/holds]
[(n)either violinist {Menuhin} (n)or writer {"The Yehudi Principle"} (n)or
molder (n)or older]
[you must strive/think/look/sense all of it, or you will miss the meanings
of it all]
[EMAIL PROTECTED] Forwards only to:
[EMAIL PROTECTED] CC: auto to:
[EMAIL PROTECTED] Be short < 160 chars cuts off; currently
offline
[EMAIL PROTECTED] CC: auto to ^
http://www.authorsden.com/royacrabtree
http://skyscraper.fortunecity.com/activex/720/resume/full.doc
--
(c) RAC/IP, ARE,PRO,PAST
(Copyright) Roy Andrew Crabtree/In Perpetuity
All Rights/Reserved Explicitly
Public Reuse Only
Profits Always Safe Traded
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm