def hypersimilar(f, g, k):
 (f, g) = list(map(sympify, (f, g)))
 h = (f / g).rewrite(gamma)
 h = h.expand(func=True, basic=False)
 return h.is_rational_function(k)

def hypersimilar ( f , g , k ) : ( f , g ) = list ( map ( sympify , ( f , g ) ) ) h = ( f / g ) . rewrite ( gamma ) h = h . expand ( func = True , basic = False ) return h . is_rational_function ( k )
returns true if f and g are hyper-similar .