From: SourceForge.net <no...@so...> - 2007-09-26 07:19:54
|
Patches item #1779428, was opened at 2007-08-22 13:45 Message generated for change (Comment added) made by ukeshav You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312867&aid=1779428&group_id=12867 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: keshav upadhyaya (ukeshav) Assigned to: Nobody/Anonymous (nobody) Summary: patch for : [ 1758284 ] Complex parses complex('1' * 500) as Initial Comment: hi i have added one check for infinite and resolve the issue now test_complex is running fine ---------------------------------------------------------------------- >Comment By: keshav upadhyaya (ukeshav) Date: 2007-09-26 07:19 Message: Logged In: YES user_id=1833960 Originator: YES pjenvey :- if we are checking with varible Z we need not to check with NEGATIVE_INFINITY it is needed only when we are checking with variable x i am attaching patch plz have a look on it.. File Added: bug_complex_range.diff ---------------------------------------------------------------------- Comment By: Philip Jenvey (pjenvey) Date: 2007-09-22 02:05 Message: Logged In: YES user_id=145787 Originator: NO actually, is the NEGATIVE_INFINITY check needed at all? seems like the way complex parses numbers, they might only be positive in this case, but I'm not totally sure about that ---------------------------------------------------------------------- Comment By: Philip Jenvey (pjenvey) Date: 2007-09-22 01:54 Message: Logged In: YES user_id=145787 Originator: NO sourceforge kind of munged the diff I was trying to present to you, maybe this one will be easier to read: z = Double.valueOf(string.substring(s, end)).doubleValue(); -if (z == Double.POSITIVE_INFINITY || x == Double.NEGATIVE_INFINITY) { - throw Py.ValueError("double() out of range:" + string); +if (z == Double.NEGATIVE_INFINITY || z == Double.POSITIVE_INFINITY) { + throw Py.ValueError("float() out of range: " + string); } Also this patch contains a tab character. Could you please disable tabs in your editor for all future patches? The codebase prefers spaces, thanks! ---------------------------------------------------------------------- Comment By: Philip Jenvey (pjenvey) Date: 2007-09-22 01:50 Message: Logged In: YES user_id=145787 Originator: NO Is the comparison of x to Double.NEGATIVE_INFINITY a typo? Shouldn't that be compared against z?: z = Double.valueOf(string.substring(s, end)).doubleValue(); - if (z == Double.POSITIVE_INFINITY || x == Double.NEGATIVE_INFINITY) { - throw Py.ValueError("double() out of range:" + string); + if (z == Double.NEGATIVE_INFINITY || z == Double.POSITIVE_INFINITY) { + throw Py.ValueError("float() out of range: " + string); } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312867&aid=1779428&group_id=12867 |