Loading [MathJax]/jax/output/CommonHTML/jax.js

Table of Contents

Eq

You can compare two response functions. Two response functions G1(ω,Γ) and G2(ω,Γ) are considered to be equal when |G1(ω,Γ)G2(ω,Γ)|<ϵ for ϵ=1011 at all values of ω and Γ=ω/10.

For example

Input

Example.Quanty
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)

Result

G1 is equal to G2	true
G1 is equal to G3	false

Table of contents

Print/export