def verify_numerically(f, g, z=None, tol=1e-06, a=2, b=(-1), c=3, d=1):
 (f, g, z) = Tuple(f, g, z)
 z = ([z] if isinstance(z, Symbol) else (f.free_symbols | g.free_symbols))
 reps = list(zip(z, [random_complex_number(a, b, c, d) for zi in z]))
 z1 = f.subs(reps).n()
 z2 = g.subs(reps).n()
 return comp(z1, z2, tol)

def verify_numerically ( f , g , z = None , tol = 1e-06 , a = 2 , b = ( - 1 ) , c = 3 , d = 1 ) : ( f , g , z ) = Tuple ( f , g , z ) z = ( [ z ] if isinstance ( z , Symbol ) else ( f . free_symbols | g . free_symbols ) ) reps = list ( zip ( z , [ random_complex_number ( a , b , c , d ) for zi in z ] ) ) z1 = f . subs ( reps ) . n ( ) z2 = g . subs ( reps ) . n ( ) return comp ( z1 , z2 , tol )
test numerically that f and g agree when evaluated in the argument z .