Fausto,
In general, both m and n will be nonzero. In that case
(m - 1) ack ( m ack (n - 1))
has to be invoked before other paths through the code can return to the
caller. As a consequence the above expression has to return the final
result (in general, that is). S
Hi Fred,
maybe I understood but I expected the control was returned to caller when
the m=0 condition was met and not before.
If I look better at the program... i can understand that after all the
"ack" evaluation the program must exit... but in my case was performing the
n-increment.
This could
On Wed, 2015-04-15 at 23:24 +0200, Fausto Saporito wrote:
Hello Fausto,
Because during the recursion each time
(m - 1) ack ( m ack (n - 1))
is evaluated, control (with the intermediate result) must be returned to
the caller of ack (which will be ack itself except for the init
Hi Fred,
thanks a lot.
Now it works... but (maybe it's a stupid question) why that change? :-)
regards,
Fausto
2015-04-15 22:37 GMT+02:00 Frederick H. Pitts :
> Fausto,
>
> Try changing the fourth line to
>
> z←(m-1) ack (m ack (n-1))⋄ →0
>
> Regards,
>
> Fred
>
> On Wed, 2015-04-15 at
Fausto,
Try changing the fourth line to
z←(m-1) ack (m ack (n-1))⋄ →0
Regards,
Fred
On Wed, 2015-04-15 at 21:03 +0200, Fausto Saporito wrote:
> Hello all,
>
>
> I'm trying to implement ackerman function, but I got no luck ... and I
> cannot understand why this code doesn't work:
>
>
Hello all,
I'm trying to implement ackerman function, but I got no luck ... and I
cannot understand why this code doesn't work:
z←m ack n
→(m=0)/∆1
→(n=0)/∆2
z←(m-1) ack (m ack (n-1))
∆1: z←n+1 ⋄ →0
∆2: z←(m-1) ack 1
is the double recursion permitted in APL2 ?
thanks,
fausto
Hi Jürgen:
Gandalf:apl-svn pteeson$ make clean
Making clean in doc
test -z "apl.dvi apl.pdf apl.ps apl.html" \
|| rm -rf apl.dvi apl.pdf apl.ps apl.html
rm -rf .libs _libs
rm -rf apl.t2d apl.t2p
rm -f *.lo
Making clean in gnu-apl.d
rm -rf .libs _libs
rm -f *.lo
Making clean in src
rm -f ma
According to my documentation that I copied from the ISO spec, 8○ should be
equivalent to: (¯1-R⋆2)⋆0.5 and ¯8○ should be equal to -(¯1-R×2)⋆0.5.
In GNU APL the opposite happens. I.e. ¯8○ returns what 8○ is supposed to
return and vice versa.
Is my analysis correct?
Regards,
Elias
Hi Alex,
the stack trace is probably explicitly triggered for debugging
purposes.
The parallel code is not yet complete, in particular error cases
are not handled yet.
Most likely what happens is that one thread stops due to an error
If I trace a variable (used for live-updates of variable content in an
Emacs buffer) and then do )LOAD, the workspace gets cleared. At this point
I'd expect to get an update notification for the variable with an event
type of SEV_ERASED. Since this does not happen, I'm getting a crash when I
later
10 matches
Mail list logo