rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

askequal change/regression since 5.47.0 #649

Open rtoy opened 2 months ago

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-03 03:09:04 Created by billingd on 2023-09-28 03:19:23 Original: https://sourceforge.net/p/maxima/bugs/4186


There is a regression/change in askequal since version 5.47.0.

assume(notequal(a,9))$
askequal(sqrt(9-a)-1,-1);

used to return "no" but now asks "Is sqrt(9 - a) - 1 equal to - 1?"

Now test kamke 2.405 in share/contrib/diffequations/tests/rtestode_kamke_2_5.mac fails. I can work around the issue by assuming a>9.

I will arrange a witch-hunt with git bisect to find the patch responsible, which may be an improvement and not a bug.

$ maxima
Maxima 5.47.0 https://maxima.sourceforge.io
using Lisp CLISP 2.49+ (2010-07-17)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) assume(notequal(a,9));
(%o1)                          [notequal(a, 9)]
(%i2) askequal(sqrt(9-a)-1,-1);
(%o2)                                 no
(%i3) 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.47.0"
Maxima build date: "2023-06-25 17:16:51"
Host type: "x86_64-pc-cygwin"
Lisp implementation type: "CLISP"
Lisp implementation version: "2.49+ (2010-07-17) (built on Walter [192.168.178.24])"
User dir: "/home/dabilling/.maxima"
Temp dir: "/tmp"
Object dir: "/home/dabilling/.maxima/binary/5_47_0/clisp/2_49___2010_07_17___built_on_Walter__192_168_178_24__"
Frontend: false
-------------------------------------------------------------
The above information is also reported by the function 'build_info()'.

vs

$ ../../../../maxima-local
Maxima branch_5_47_base_422_g5af05c477_dirty https://maxima.sourceforge.io
using Lisp CLISP 2.49+ (2010-07-17)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) assume(notequal(a,9));
(%o1)                          [notequal(a, 9)]
(%i2) askequal(sqrt(9-a)-1,-1);
Is sqrt(9 - a) - 1 equal to - 1?

no;
(%o2)                                 no
(%i3) 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: "branch_5_47_base_422_g5af05c477_dirty"
Maxima build date: "2023-09-28 11:52:53"
Host type: "x86_64-pc-cygwin"
Lisp implementation type: "CLISP"
Lisp implementation version: "2.49+ (2010-07-17) (built 3666924299) (memory 3904854775)"
User dir: "/home/dabilling/.maxima"
Temp dir: "/tmp"
Object dir: "/usr/local/src/maxima/binary/branch_5_47_base_422_g5af05c477_dirty/clisp/2_49___2010_07_17___built_3666924299___memory_3904854775_"
Frontend: false
-------------------------------------------------------------
The above information is also reported by the function 'build_info()'.
rtoy commented 2 months ago

Imported from SourceForge on 2024-07-03 03:09:05 Created by billingd on 2023-09-28 04:19:34 Original: https://sourceforge.net/p/maxima/bugs/4186/#d9f5


contrib_ode testsuite issue addressed in commit [80b8f1]

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-03 03:09:08 Created by robert_dodier on 2023-11-03 19:50:15 Original: https://sourceforge.net/p/maxima/bugs/4186/#ef63


rtoy commented 2 months ago

Imported from SourceForge on 2024-07-03 03:09:12 Created by robert_dodier on 2023-11-06 04:56:20 Original: https://sourceforge.net/p/maxima/bugs/4186/#941f


rtoy commented 2 months ago

Imported from SourceForge on 2024-07-03 03:09:15 Created by robert_dodier on 2023-11-06 04:56:20 Original: https://sourceforge.net/p/maxima/bugs/4186/#d157


For the record, git bisect shows that commit [ 44d91a7 ] is the place where the behavior changed. The commit log says:

commit 44d91a796e3868de4524e173343e1e1844e95155
Author: Marius Gerbershagen <marius.gerbershagen@physik.uni-wuerzburg.de>
Date:   Fri Nov 5 14:32:07 2021 +0100

    Fix sign function with rational powers of complex arguments

    In complex mode we cannot assume for instance that sqrt(-x)=0 for x <=
    0.  Anything non-positive or non-zero to the power of 1/(2*n) for
    integer n has sign '$complex.

    Example of a bug which is fixed by this commit:

    (%i1) abs(sqrt(sin(theta) - 1));
    (%o1)                                  0

I didn't investigate whether the changed behavior is a bug or not; probably not, I'm guessing, but it should be reviewed.