fixed a bug with complex numbers
added tests for inf and the intersection function