Menu

#4662 apply1 sets match to zero when instead the replacement is zero.

None
open
nobody
None
5
2026-01-23
2026-01-23
Fera Duben
No

Hi,
I expected 0 when -2 came in (%o7):

(%i3) matchdeclare(freeofK,freeof(K))
(%i4) defrule(rule1,freeofK*K,freeofK-1)
(%i5) apply1(2*K,rule1)
(%o5)                                      1
(%i6) defrule(rule2,freeofK*K,freeofK-2)
(%i7) apply1(2*K,rule2)
(%o7)                                     - 2
(%i8) bug_report()

Please report bugs to:
    https://sourceforge.net/p/maxima/bugs
To report a bug, you must have a Sourceforge account.
Please include the following information with your bug report:
-------------------------------------------------------------
Maxima version: "5.46.0"
Maxima build date: "2024-04-01 09:31:47"
Host type: "x86_64-pc-linux-gnu"
Lisp implementation type: "GNU Common Lisp (GCL)"
Lisp implementation version: "GCL 2.6.14 git tag Version_2_6_15pre7"
User dir: "/home/USER/.maxima"
Temp dir: "/tmp"
Object dir: "/home/USER/.maxima/binary/5_46_0/gcl/GCL_2_6_14_git_tag_Version_2_6_15pre7"
Frontend: false

Discussion


Log in to post a comment.