Sender: |
|
Date: |
Tue, 7 Feb 2012 12:18:38 +0000 |
Content-Disposition: |
inline |
Reply-To: |
|
Subject: |
|
MIME-Version: |
1.0 |
Message-ID: |
<20120207121838.GA29522@csmvddesktop> |
In-Reply-To: |
|
Content-Type: |
multipart/mixed; boundary="8t9RHnE3ZwKMSgU+" |
From: |
|
Parts/Attachments: |
|
|
* Bruno Le Floch <[log in to unmask]> [2012-02-05 13:01:41 -0500]:
Dear Bruno,
I finaly solved the problem. It was related to substitution issues
(as you already pointed out correcty).
I have one question regarding your suggestion:
: \DeclareDocumentCommand{\f}{om}
: {
: <compute f(#2) using assignments,
: store the result in \l_recurrence_result_int>
: \IfValue{#1}
: { \tl_set:NV #1 \l_recurrence_result_int }
: { \int_use:N \l_recurrence_result_int }
: }
I don't see how this can work. (Maybe it works for fibonacci-like
recurrences.) For example, the computation only uses one counter, so
it seems to me that it cannot benefit from recurrences like
g[ 0 ] = 0,
g[ 1 ] = 1,
g[ 2 ] = 2,
g[ i ] = g[ i - 1 ] + g[ i - 2 ] + g[ i - 3 ]
Am I missing something?
I'm attaching the sources. The implementation still doesn't work
properly because guard expressions aren't parsed correctly. I'll
fix this first and then reimplement the module for more than one
index (and perhaps multiple functions).
Thanks again for your help. I've learnt a lot.
Regards,
Marc
|
|
|