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:objects:responsefunction:operations:eq [2024/12/17 16:09] Maurits W. Haverkortdocumentation:language_reference:objects:responsefunction:operations:eq [2024/12/20 17:59] (current) Maurits W. Haverkort
Line 3: Line 3:
  
 ### ###
-alligned paragraph text +You can compare two response functions. Two response functions $G1(\omega,\Gamma)$ and $G2(\omega,\Gamma)$ are considered to be equal when $|G1(\omega,\Gamma) - G2(\omega,\Gamma)| < \epsilon$ for $\epsilon=10^{-11}$ at all values of $\omega$ and $\Gamma \omega/10$. 
-### +
- +
-===== Example ===== +
- +
-### +
-description text+
 ### ###
  
 +For example
 ==== Input ==== ==== Input ====
 <code Quanty Example.Quanty> <code Quanty Example.Quanty>
--- some example code+a1 = {0, -1,-0.5, 0,   0.5,   1, 1.5} 
 +b1 = {  0.2, 0.4, 0.2, 0.4, 0.6, 0.2} 
 +G1 = ResponseFunction.New( {a1,b1,mu=0,type="ListOfPoles", name="G1"} ) 
 + 
 +a2 = {0, -1,-0.5, 0,   0.5,   1, 1.5} 
 +b2 = {  0.2, 0.4, 0.2, 0.4, 0.6, 0.2+1E-12} 
 +G2 = ResponseFunction.New( {a2,b2,mu=0,type="ListOfPoles", name="G2"} ) 
 + 
 +a3 = {0, -1,-0.5, 0,   0.5,   1, 1.5} 
 +b3 = {  0.2, 0.4, 0.2, 0.4, 0.6, 0.2+1E-10} 
 +G3 = ResponseFunction.New( {a3,b3,mu=0,type="ListOfPoles", name="G3"} ) 
 + 
 + 
 +print("G1 is equal to G2",G1==G2) 
 +print("G1 is equal to G3",G1==G3)
 </code> </code>
  
 ==== Result ==== ==== Result ====
 <file Quanty_Output> <file Quanty_Output>
-text produced as output+G1 is equal to G2 true 
 +G1 is equal to G3 false
 </file> </file>
  
 ===== Table of contents ===== ===== Table of contents =====
-{{indexmenu>..#2|tsort}}+{{indexmenu>../#2|tsort}}
  
Print/export