Bug#1052596: Maybe tell user when input to Poly() == 0

Kingsley G. Morse Jr. kingsley at loaner.com
Mon Sep 25 22:00:43 BST 2023


I'm happy to report another open source computer
algebra system said my input equals zero.

You can see this is so at Bash's shell command
line with

    $ mathomatic -e "((a - b) - (((a - b) + (c - d) + (e - f))/3)) + ((c - d) - (((a - b) + (c - d) + (e - f))/3)) + (e - f) - ((a - b) + (c - d) + (e - f))/3" simplify

At least on my computer, it returns


                (a - b + c - d + e - f)           (a - b + c - d + e - f)           (a - b + c - d + e - f)
    #1: a - b - ----------------------- + c - d - ----------------------- + e - f - -----------------------
                           3                                 3                                 3


    #1: 0


If you happen to have the time, and are so
inclined, I'd be interested in your thoughts on
whether Poly() might be improved by distinguishing
between

    GeneratorsNeeded: Cannot initialize from 'dict' without generators

and

    its input equaling 0.

I think the relevant code may be near line 250 in
/usr/lib/python3/dist-packages/sympy/polys/polytools.py

Thanks again for maintaining Debian's cool sympy
package.

Kind regards,
Kingsley

-- 
Time is the fire in which we all burn.



More information about the debian-science-maintainers mailing list