LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Tue, 7 Feb 2012 12:18:38 +0000
Content-Type:
multipart/mixed
Parts/Attachments:
text/plain (1061 bytes) , recurrence.sty (6 kB) , recurrence.tex (6 kB)
* 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


ATOM RSS1 RSS2