# How to get rid of 0. (zero dot) without get rid of small number? [duplicate]

I am trying to get rid of terms with 0., $x+0.I$ for example.

I've found this question: A dot appearing after a zero, and making the entries of a matrix into fractions and the solution is using Chop.

However, some terms that I want to keep are very small, $10^{-14}$, and also neglect with Chop too.

As I looked on the internet, I can't find the solution for this question. If it is duplicate, please let me know.

Thanks.

• Would the 2-argument form of Chop suit your needs? – Jason B. Feb 24 '17 at 15:01
• Are you trying to get rid of imaginary parts or am I misinterpreting? If so, you can use Re. – N.J.Evans Feb 24 '17 at 16:22
• @N.J.Evans The answer is yes. However, I am stuck with the problem that Re gives me Re(...). Then, I use Refine but imaginary parts still exists, Re(n1+n2*I)x y. Finally, I use Conjugate to get rid of imaginary parts and then I get this problem. – NaC Feb 25 '17 at 1:03
• @JasonB. I admitted that I just know that I can use 2-argument form of Chop. It's my mistake. However, @mikado's answer can solve this problem too. – NaC Feb 25 '17 at 1:08