Chop
Replaces a real number very close to 0 with exact 0.
Wolfram Language
Chop✓Chop(x)0 if Details
- Replaces a value smaller in magnitude than about
with exact 0 -- cleanup for the floating-point noise left over from a numeric computation. - Chops the real and imaginary parts of a complex number independently.
- Only the value's own magnitude matters --
stays as is, since it isn't close to 0, even though it's close to the integer 1. - Takes a single argument; there's no way to override the
threshold.
Examples
See also: Round