0

I seem to be getting inconsistent results from texput and lambda functions for returning strings. I'm almost certain I must be overlooking something, but just can't see it, right now.

These two functions look identical to me, and yet one parses and the other returns an error:enter image description here

The point of the experiment was to understand what exactly is passed to lambda when texput is used to set the output for tex1, as I was running into behaviour I didn't understand.

Rax Adaam
  • 790
  • 3
  • 11
  • 1
    I can't reproduce the bug; for `tex1(tex2(2*x^3 - 2*x))` I get the same output as for `tex1(t1(2*x^3 - 2*x))`, as expected. I see the error message claims that `e` is equal to `2*x^3 -2*x`, but `texput` is supposed to arrange for `e` to be equal to `text2(2*x^3-2*x)`. Is it possible there exists a function named `text2` and its return value is `2*x^3-2*x`? By the way I am working with Maxima 5.44.0. – Robert Dodier Mar 05 '21 at 02:46
  • I wondered about that as well, but there's no such function, so far as I can tell. I tried opening new sessions, tried evaluating `text2`, `text2(x)` and `tex1(text2(x))` but they were all returned as they would for `text2` not defined. I'm never sure whether these kinds of bugs are worth the time to figure out, or not. Thank you for confirming the form of `e`. I'll be sure to update here if I can sort out what's going on. – Rax Adaam Mar 05 '21 at 18:43
  • 1
    Hm. Maybe you can try it in a Maxima console session instead of wxMaxima. – Robert Dodier Mar 05 '21 at 18:50

0 Answers0