Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
documentation:language_reference:functions:chop [2016/10/10 09:41] – external edit 127.0.0.1documentation:language_reference:functions:chop [2025/07/25 11:14] (current) – Corrected default tolerance Johann Collard
Line 2: Line 2:
  
 ### ###
-Chop(//a//) replaces approximate real numbers in //a// that are close to zero by the exact integer 0. Chop(//a//, $\epsilon$) replaces numbers smaller in absolute magnitude than $\epsilon$ by 0. Chop uses a default tolerance of $\epsilon=10^{-10}$. Chop works on Real and Complex numbers as well as on operators and wavefunctions. +Chop(//a//) replaces approximate real numbers in //a// that are close to zero by the exact integer 0. Chop(//a//, $\epsilon$) replaces numbers smaller in absolute magnitude than $\epsilon$ by 0. Chop uses a default tolerance of $\epsilon=2.3\cdot10^{-15}$ (or 10 times the double machine precision DBL_EPSILON if defined). Chop works on Real and Complex numbers as well as on operatorswavefunctions, Tight binding and response function objects
 ### ###
  
Line 110: Line 110:
  
 </file> </file>
 +
 +==== Options ====
 +
 +The last element of Chop can be a table of options. Possible options are:
 +  * "Distance" For tight binding objects one can chop according to the size of the hopping matrix element (keep all that are larger) or chop according to the distance between the atoms (keep all interactions that connect sites with a distance that is smaller than the given length).
  
 ===== Table of contents ===== ===== Table of contents =====
 {{indexmenu>.#1}} {{indexmenu>.#1}}
Print/export