Chop
Chop[expr]
replaces approximate real numbers in expr that are close to zero by the exact integer 0.
Chop[expr,delta]
replaces numbers smaller in absolute magnitude than delta by 0.
Examples
open allclose allApplications (2)
Test if two numbers are the same to a certain tolerance:
They are the same to the default tolerance of :
They are not the same to the tolerance of :
Eliminate very small terms before comparing with Equal:
They are not equal because a small number is not equal to zero:
Properties & Relations (1)
Possible Issues (1)
Machine complex numbers have machine reals for both real and imaginary parts:
Consequently, Chop does not make the real part of machine complex numbers an exact zero:
Small imaginary parts from machine complex numbers are eliminated to make a machine real:
Text
Wolfram Research (1988), Chop, Wolfram Language function, https://reference.wolfram.com/language/ref/Chop.html.
CMS
Wolfram Language. 1988. "Chop." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Chop.html.
APA
Wolfram Language. (1988). Chop. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Chop.html