[Python-ideas] Floating point "closeness" Proposal Outline
Chris Barker
chris.barker at noaa.gov
Tue Jan 20 18:11:33 CET 2015
On Mon, Jan 19, 2015 at 10:50 PM, Terry Reedy <tjreedy at udel.edu> wrote:
> If the function only handles 'relatively close', I would be happier with
> 'relative_close' or 'rel_close' than 'is close' since the latter tends to
> imply to me absolute closeness.
>
yeah, though I think Ron has persuaded me that we can (and proaly need to,
for the near-zero case) have it do both relative and absolute....
The proposed doc (and docstring) should mention absolute tolerance and
> 'abs(a-b) < tol' as an alternative, expecially near or at 0.
absolutely -- I think the near-zero case is where we need to put absolute
in there, and once it's there, why not use it for other use-cases?
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150120/5e216091/attachment.html>
More information about the Python-ideas
mailing list