[GiNaC-list] Term ordering and compiling C++ code
cape1232 at yahoo.com
Fri May 28 21:02:12 CEST 2010
Actually, the simplest explanation is: since hashes aren't unique, ex_is_less doesn't
work for GinacPrint. Forgive the verbosity below! ;)
Support NPR 20 seconds at a time. www.twentysecondsatatime.org
--- On Fri, 5/28/10, Doug <cape1232 at yahoo.com> wrote:
From: Doug <cape1232 at yahoo.com>
Subject: Re: [GiNaC-list] Term ordering and compiling C++ code
To: jros at unavarra.es, "GiNaC discussion list" <ginac-list at ginac.de>
Date: Friday, May 28, 2010, 1:15 PM
This doesn't work. I may be wrong on the explanation, so someone with more experience please correct me.
On cursory inspection of ex_is_less and the compare functions it references, ex_is_less boils down to a) comparing the expressions hash values. If they are the same, which is the case that matters, then b) you test pointer values. But each expression in the expression tree will have its own pointer, or at least it appears to in practice.
More information about the GiNaC-list