File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,8 +101,8 @@ def __idiv__(self, other):
101101 try :
102102 if not isinstance (other , Complex ):
103103 other = Complex (other )
104- den = other * Complex ( other .re , - other . im )
105- num = self * Complex ( other .re , - other . im )
104+ den = other * other .con ( )
105+ num = self * other .con ( )
106106 self .re = num .re / den .re
107107 self .im = num .im / den .re
108108 return Complex (self .re , self .im )
@@ -113,8 +113,8 @@ def __ifloordiv__(self, other):
113113 try :
114114 if not isinstance (other , Complex ):
115115 other = Complex (other )
116- den = other * Complex ( other .re , - other . im )
117- num = self * Complex ( other .re , - other . im )
116+ den = other * other .con ( )
117+ num = self * other .con ( )
118118 self .re = num .re // den .re
119119 self .im = num .im // den .re
120120 return Complex (self .re , self .im )
You can’t perform that action at this time.
0 commit comments