[GiNaC-list] how to drop terms in expression with small coefficients?

Tomasz Rudny trudi at wp.pl
Sat Sep 3 14:22:18 CEST 2011


I have the following problem - I have a polynomial P(x) and before I 
proceed with some calculations on it, I want to make sure it does not 
contain terms like for example:

     10e-12 * x

(in my case x is from (0, 1) so this is safe).

I want to somehow get rid of such small terms.

In another words for polynomial P(x) = 2.3 * x ^ 2 + 10e-12 * x + 3.76

I want to obtain polynomial Q(x) = 2.3 * x ^ 2 + 3.76

How do I do that i GiNaC?

Please, help.

I will kindly appreciate any advice.

Kind Regards,

More information about the GiNaC-list mailing list