Open rtoy opened 3 months ago
Imported from SourceForge on 2024-07-07 00:11:09 Created by zmth on 2021-09-07 08:22:24 Original: https://sourceforge.net/p/maxima/bugs/3850/#3f11
You need to review some basic Maxima concepts.
:=
defines a function:
sets a variable=
denotes an equationAlso:
r(n)
denotes a function applicationr[n]
denotes a subscripted variableMaxima supports defining memoized functions using the subscripting notation as follows:
fib[n]:=fib[n-1]+fib[n=2]$ << functional definition
fib[0]: 1$ << define specific value
fib[1]: 1$ << define specific value
Note carefully that in the :
cases, the subscript is taken literally, not as a parameter, so:
test[q]: q+1$
test[q] => q+1
test[3] => test[3] <<< 3 is *not* bound to ``q``
Imported from SourceForge on 2024-07-07 00:11:13 Created by l_butler on 2021-09-07 11:45:26 Original: https://sourceforge.net/p/maxima/bugs/3850/#3f11/cb21
When you write
r(n) := ...
you are defining a function r
of a single variable n
.
When you write
r(n) : ...
you are committing a syntax error.
You can do something like this by treating r
as an undeclared array,
in which case you could write
r[n] : ...
I suspect that is what you intend. However, note that r[3]
will not
work as you might want.
I will close this report because you are not reporting a bug. Please use the maxima-discuss email list for these types of problems.
Leo
"dan hayes" zmth@users.sourceforge.net writes:
though it doesn't give error if write it as:
(t(n):=n^4,r(n):=t(n+1)/t(n));
which should be the same as leaving off the = sign above and since it does give the ans here there is no reason why it should give error to r(n):=t(n+1)/t(n)
[bugs:#3850] refuses to give answer to simple problem-instead gives irrelevant error
Status: open Group: None Created: Tue Sep 07, 2021 08:13 AM UTC by dan hayes Last Updated: Tue Sep 07, 2021 08:13 AM UTC Owner: nobody
build_info(version="5.43.0",timestamp="2019-06-01 18:55:31",host="x86_64-w64-mingw32",lisp_name="SBCL",lisp_version="1.4.14",maxima_userdir="C:/Users/zmth/maxima",maxima_tempdir="C:/Users/zmth/AppData/Local/Temp",maxima_objdir="C:/Users/zmth/maxima/binary/5_43_0/sbcl/1_4_14",maxima_frontend="wxMaxima",maxima_frontend_version="19.05.7")
(t(n):=n^4,r(n):t(n+1)/t(n))
maxima gives bogus error cannot assign to r(n) instead of the obvious r(n)=(n+1)^4/n^4
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/maxima/bugs/3850/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Imported from SourceForge on 2024-07-07 00:11:16 Created by zmth on 2021-09-11 02:56:16 Original: https://sourceforge.net/p/maxima/bugs/3850/#3f11/8071
i think i can withdraw this bug report but don't know how as can't locate it in bugs forum
On Tuesday, September 7, 2021, 3:22:27 AM CDT, dan hayes <zmth@users.sourceforge.net> wrote:
though it doesn't give error if write it as: (t(n):=n^4,r(n):=t(n+1)/t(n));
which should be the same as leaving off the = sign above and since it does give the ans here there is no reason why it should give error to r(n):=t(n+1)/t(n)
[bugs:#3850] refuses to give answer to simple problem-instead gives irrelevant error
Status: open Group: None Created: Tue Sep 07, 2021 08:13 AM UTC by dan hayes Last Updated: Tue Sep 07, 2021 08:13 AM UTC Owner: nobody
build_info(version="5.43.0",timestamp="2019-06-01 18:55:31",host="x86_64-w64-mingw32",lisp_name="SBCL",lisp_version="1.4.14",maxima_userdir="C:/Users/zmth/maxima",maxima_tempdir="C:/Users/zmth/AppData/Local/Temp",maxima_objdir="C:/Users/zmth/maxima/binary/5_43_0/sbcl/1_4_14",maxima_frontend="wxMaxima",maxima_frontend_version="19.05.7") (t(n):=n^4,r(n):t(n+1)/t(n))
maxima gives bogus error cannot assign to r(n) instead of the obvious r(n)=(n+1)^4/n^4
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/maxima/bugs/3850/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Attachments:
Imported from SourceForge on 2024-07-07 00:11:20 Created by l_butler on 2021-09-11 11:51:37 Original: https://sourceforge.net/p/maxima/bugs/3850/#3f11/8071/5906
Dan, It has already been closed. Leo
"dan hayes" zmth@users.sourceforge.net writes:
i think i can withdraw this bug report but don't know how as can't locate it in bugs forum
On Tuesday, September 7, 2021, 3:22:27 AM CDT, dan hayes <zmth@users.sourceforge.net> wrote:
though it doesn't give error if write it as: (t(n):=n^4,r(n):=t(n+1)/t(n));
which should be the same as leaving off the = sign above and since it does give the ans here there is no reason why it should give error to r(n):=t(n+1)/t(n)
[bugs:#3850] refuses to give answer to simple problem-instead gives irrelevant error
Status: open Group: None Created: Tue Sep 07, 2021 08:13 AM UTC by dan hayes Last Updated: Tue Sep 07, 2021 08:13 AM UTC Owner: nobody
build_info(version="5.43.0",timestamp="2019-06-01 18:55:31",host="x86_64-w64-mingw32",lisp_name="SBCL",lisp_version="1.4.14",maxima_userdir="C:/Users/zmth/maxima",maxima_tempdir="C:/Users/zmth/AppData/Local/Temp",maxima_objdir="C:/Users/zmth/maxima/binary/5_43_0/sbcl/1_4_14",maxima_frontend="wxMaxima",maxima_frontend_version="19.05.7") (t(n):=n^4,r(n):t(n+1)/t(n))
maxima gives bogus error cannot assign to r(n) instead of the obvious r(n)=(n+1)^4/n^4
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/maxima/bugs/3850/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
[bugs:#3850] refuses to give answer to simple problem-instead gives irrelevant error
Status: not-a-bug Group: None Created: Tue Sep 07, 2021 08:13 AM UTC by dan hayes Last Updated: Wed Sep 08, 2021 02:28 PM UTC Owner: nobody
build_info(version="5.43.0",timestamp="2019-06-01 18:55:31",host="x86_64-w64-mingw32",lisp_name="SBCL",lisp_version="1.4.14",maxima_userdir="C:/Users/zmth/maxima",maxima_tempdir="C:/Users/zmth/AppData/Local/Temp",maxima_objdir="C:/Users/zmth/maxima/binary/5_43_0/sbcl/1_4_14",maxima_frontend="wxMaxima",maxima_frontend_version="19.05.7")
(t(n):=n^4,r(n):t(n+1)/t(n))
maxima gives bogus error cannot assign to r(n) instead of the obvious r(n)=(n+1)^4/n^4
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/maxima/bugs/3850/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Imported from SourceForge on 2024-07-07 00:11:07 Created by zmth on 2021-09-07 08:13:02 Original: https://sourceforge.net/p/maxima/bugs/3850
build_info(version="5.43.0",timestamp="2019-06-01 18:55:31",host="x86_64-w64-mingw32",lisp_name="SBCL",lisp_version="1.4.14",maxima_userdir="C:/Users/zmth/maxima",maxima_tempdir="C:/Users/zmth/AppData/Local/Temp",maxima_objdir="C:/Users/zmth/maxima/binary/5_43_0/sbcl/1_4_14",maxima_frontend="wxMaxima",maxima_frontend_version="19.05.7")
maxima gives bogus error cannot assign to r(n) instead of the obvious r(n)=(n+1)^4/n^4