Re: [GiNaC-devel] [GiNaC-list] A strange behaviour while implementing archive in a user-defined class
On Mon, 20 Dec 2021 08:57:42 +0000, Oleg Finkelshteyn <olegfink@gmail.com> said:
OF> i suspect this is actually due to a typo in OF> relational::compare_same_type. Thanks for spotting the source. It is worth to cross-post your patch to GiNaC-devel list. -- Vladimir V. Kisil http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Maps https://doi.org/10.1142/p835 Soft: Geometry of cycles http://moebinv.sourceforge.net/ Jupyter notebooks: https://github.com/vvkisil?tab=repositories ==================================================== diff --git a/ginac/relational.cpp b/ginac/relational.cpp index 599a2635..dbc541a3 100644 --- a/ginac/relational.cpp +++ b/ginac/relational.cpp @@ -223,8 +223,8 @@ int relational::compare_same_type(const basic & other) const return (o < oth.o) ? -1 : 1; break; } - const int lcmpval = lh.compare(oth.rh); - return (lcmpval!=0) ? lcmpval : rh.compare(oth.lh); + const int lcmpval = lh.compare(oth.lh); + return (lcmpval!=0) ? lcmpval : rh.compare(oth.rh); }
participants (1)
-
Vladimir V. Kisil