[GiNaC-list] assignment

Alexei Sheplyakov alexei.sheplyakov at gmail.com
Mon Mar 28 15:46:48 CEST 2011


Hello,

> rinterval inter(a,b,(numeric)0.00001);
                                 ^^^^^^^^^^^^^^^^^^^

Casting double to GiNaC::numeric is absolutely wrong. For starters,
sizeof(numeric) != sizeof(double), numeric is reference counted, and
double is not, and so on. Just don't do this. Use the normal constructor
instead, that is

 rinterval inter(a, b, numeric(0.00001));

Best regards,
         Alexei


More information about the GiNaC-list mailing list