...but I am trying to learn J and this confused the heck out of me (I
was doing the lab on Catalan numbers); given the last email was about an
error I thought I'd ask about this....surely one of simplest issues a
neebie could have ....for example below,
$":123456789
9
$":1234567890
10
$":12345678901
11
$":1234567890123
13
$":12345678901234567
17
$":1234567890123456789
19
$":12345678901234567890
10
.NB duh ?
$":123456789012345678901
10
.NB ?? I don't understand
.NB from the lab on Catalan numbers - I have the formula called "cat2"
used on value 10000 giving a 6015 digit number (cat2 just one example of
the formula for Catalan)
cat2 10000
2245378124933852156335935842573605787011035862193658877732937138........off
screen.........
$":cat2 10000
6015
.NB so 10 is not some limit...or is it? That makes no sense...
.NB perhaps some kind of formatting issues...lets make this a pure
number first (z)
z =: cat2 10000
z
2245378124933852156335935842573605787011035862193658877732937138........off
screen.........
$":z
6015
.NB Noop that is ok so its not size, or format - what could it be?
.NB well the cat2 10000 is presented with ellipses so I cant try just
$":<<<the super long screen print>>> as you get ill-formed number (ellipses)
.NB so I tried some pieces of it
$":2245378124933852156335935842573605787011035
10
.NB there's 10 again...but wait...
$":2245378124933852156335935842573605787011035359358425736057870110353593584257360578701103535935842573605787011035
11
.NB that surprised me...?
anyway apologies for bothering you guys on such a simple stumbling
block....just thought you might see that this is an example of the
frustration I have learning what otherwise looks like a fantastic
language for math....TIA for any help
Phil
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm