01:54 -!- Prax01D(n=Prax01D@tor58-10-93-126.dynamic.rogerstelecom.net) has joined #maxima 02:30 -!- trebor_dki(n=user@mail.dki.tu-darmstadt.de) has left #maxima 03:58 -!- HaraldG(n=rldprog@chello080108070152.13.11.univie.teleweb.at) has joined #maxima 07:49 -!- Prax01D(n=Prax01D@tor58-5-76-149.dynamic.rogerstelecom.net) has joined #maxima 13:56 -!- Prax01D(n=Prax01D@149.99.99.193) has joined #maxima 15:35 -!- rtoym(n=chatzill@user-0c8hpk0.cable.mindspring.com) has joined #maxima 19:41 -!- delian66(n=Miranda@213.240.243.22) has joined #maxima 19:56 -!- Prax01D(n=Prax01D@tor58-23b-95-70.dynamic.rogerstelecom.net) has joined #maxima 21:22 -!- HaraldG(n=rldprog@chello080108070152.13.11.univie.teleweb.at) has joined #maxima 22:33 -!- amitar(n=amit@DSL217-132-40-48.bb.netvision.net.il) has joined #maxima 22:41 amitar pasted "strange effect of dummy variables?" at http://paste.lisp.org/display/34366 22:43 Hi! can anyone explain the results I got in the paste above? (why would f(x) behave differently than f(y) ?) 22:47 is this chan alive? 22:47 Hi amitar. I think this is because maxima uses dynamic scopeing instead of lexical scoping. 22:48 This is one of the worse examples about that though. 22:49 There was a discussion about scope on the Mailinglist recently. 22:50 amitar annotated #34366 with "reformatting (untabify)" at http://paste.lisp.org/display/34366#1 22:50 Actually, this discussion happens every few weeks, because it is quite a mess ... 22:51 hmm... any workarounds? 22:51 (other than changing the variables all the time...) 22:53 You only need one special Variable, you always use when defining functions. 22:54 If you want to understand the behavior, play a little with the functions f(x):=?print(x) and g(x):=?print(ev(x)). 22:55 But suppose I want to define g(x):=f(2*x)+7; this would cause wrong result no? 22:56 Hm, I have to try. 22:56 HaraldG, sry - my g(x) is unrelated to your code... refers to comment about only one variable. 22:57 Yes, I got that. Still I have to try to answer your question. 23:12 amitar: No there seems to be no extra evaluation without explicit use of ev. 23:13 Not sure why sum does the extra evaluation. 23:13 Perhapts it is even a bug in sum. 23:14 any way to force it to not do it? (note: I'm not sure I understand exactly what's hapenning here - I've no experiance with maxima nor lisp) 23:17 The only thing I know is: You have to be very careful (i.e. change variable names) when using ev. I'm somewhat surprised about sum. Not sure if there are other built in functions with the same problem. 23:18 There was some code to make functions "safe" posted on the Mailinglist in the recent thread about scoping. But I think that's overkill. 23:18 How should I define a function by it's taylor series (to avoid using sum)? 23:19 Why do you want to avoid using sum? Is changeing the variables not an option for some reason? 23:20 Just that it's hard to keep track of when I should change the vars. It's a long calculation... 23:22 Well you only need to keep track if you use one problematic function inside an other. Otherwise one special variable should be enough. 23:22 hmm... maybe I'll stick to using a special variable (e.g. xxx or some other uglyness) for functions with sum. 23:24 BTW, what do you actually want to do? 23:26 My function was using asymptotic expansion of Bessel funcs at infinity, which I coded as a sum over z (encoding 1/x, to force taylor to do the right expansion). I can paste actual code if you want 23:28 No need, just curious. 23:30 well, thanks a lot. For now I'll stick to using ugly dummy-var in funcs using sum and hope that should do it. You think I should post to the list to ask if this is a bug in sum? 23:34 Yes, this can't hurt (posting to list). This is definitely not a trivial behavior. And it seems to be quite useless, as it doesn't happen with sums with fixed terms. 23:35 thanks. 23:35 -!- amitar(n=amit@DSL217-132-40-48.bb.netvision.net.il) has left #maxima