<div dir="ltr"><div><div><div>And a few comments on the patch ( I have not idea how to patch a patch...) Is there a branch somewhere with this patch applied?<br><br></div>I'm going through PEP 7, and cleaned up the docstring a bit:<br><br>diff -r 15af4f58d143 Modules/mathmodule.c<br>--- a/Modules/mathmodule.c      Sun May 24 22:27:00 2015 -0700<br>+++ b/Modules/mathmodule.c      Sun May 24 22:57:52 2015 -0700<br>@@ -2051,8 +2051,8 @@<br> }<br> <br> PyDoc_STRVAR(math_isclose_doc,<br>-"Determine if two floating point numbers are  in value\n\n"<br>-<br>+"is_close(a, b, rel_tol, abs_tol) -> bool\n\n"<br>+"Determine if two floating point numbers are similar in value\n\n"<br> "Returns True if a is close in value to b. False otherwise\n\n"<br> ":param a: one of the values to be tested\n\n"<br> ":param b: the other value to be tested\n\n"<br><br></div><div>and there is a missing space in the docs:<br><br></div><div>in math.rst:<br><br>   Return ``True`` if the values *a* and *b* are close to each other and<br>   ``False`` otherwise.<br><br></div><div>need a space between "each" and "other"<br><br></div>But it all looks good otherwise -- thanks!<br><br></div><div>-Chris<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 24, 2015 at 9:53 PM, Chris Barker <span dir="ltr"><<a href="mailto:chris.barker@noaa.gov" target="_blank">chris.barker@noaa.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I don't think I have permissions to comment on the issue,so I'm posting here. If there is a way for me to post to the issue, someone let me know...<br><br></div>In the issue (<a href="http://bugs.python.org/issue24270" target="_blank">http://bugs.python.org/issue24270</a>) Tal wrote<br><div><br>"""<br>I have a question regarding complex values. The code (from Chris Barker) doesn't support complex values (only things that can be converted into doubles). However, the PEP states the following under "Non-float types":<br><br>"complex : for complex, the absolute value of the complex values will be used for scaling and comparison. If a complex tolerance is passed in, the absolute value will be used as the tolerance."<br>"""<br><br></div><div>right -- that was written before it was decided that isclose() needed to be written in C -- the python version supported that.<br><br></div><div>"""<br>Should math.isclose() support complex values? <br>"""<br>nope -- the math module is all about floats.<br><br>"""<br>Should an equivalent function be added to cmath?<br>"""<br><br></div><div>I think so -- lets see if we can do that in time for 3.5 -- but first get the float one done.<br></div><div><br>"""<br> Should we just leave things as they are and remove mention of complex values from the PEP (it isn't mentioned in the docs)?<br clear="all">"""<br></div><div>I'll update the PEP.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>-Chris<br><br></div><div><br><br>-- <br><div><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            <a href="tel:%28206%29%20526-6959" value="+12065266959" target="_blank">(206) 526-6959</a>   voice<br>7600 Sand Point Way NE   <a href="tel:%28206%29%20526-6329" value="+12065266329" target="_blank">(206) 526-6329</a>   fax<br>Seattle, WA  98115       <a href="tel:%28206%29%20526-6317" value="+12065266317" target="_blank">(206) 526-6317</a>   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div>