Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Mathematical Functions > Numerical Functions >

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.
  • Chop uses a default tolerance of 10-10.
Zero out elements that are very close to 0:
Drop small imaginary parts:
Convert from approximate zeros to exact zeros:
Test if two numbers are the same to a certain tolerance:
They are the same to the default tolerance of 10^(-10):
They are not the same to the tolerance of 10^(-14):
Eliminate very small terms before comparing with Equal:
They are not equal because a small number is not equal to zero:
Once the small terms are eliminated, equality holds:
A functional implementation of Chop:
Chop is much faster for large expressions:
New in 1
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team