Skip to content

Commit

Permalink
Fixed bug in is_close().
Browse files Browse the repository at this point in the history
  • Loading branch information
KenKundert committed Oct 25, 2016
1 parent 228f33a commit 942fb64
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
QuantiPhy - Physical Quantities
===============================

| Version: 0.2.3
| Version: 0.2.4
| Released: 2016-10-25
.. image:: https://img.shields.io/travis/KenKundert/quantiphy/master.svg
Expand Down
4 changes: 2 additions & 2 deletions quantiphy.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@


# Constants {{{1
__version__ = '0.2.3'
__version__ = '0.2.4'
__released__ = '2016-10-25'

# These mappings are only used when reading numbers
Expand Down Expand Up @@ -532,7 +532,7 @@ def is_close(self, other):
except AttributeError: # pragma: no cover
delta = abs(self.real-float(other))
reference = max(abs(self.real), abs(float(other)))
return delta <= max(self._reltol * reference, self._abs_tol)
return delta <= max(self._reltol * reference, self._abstol)

# __float__() {{{2
def __float__(self):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name='quantiphy',
version='0.2.3',
version='0.2.4',
description='physical quantities (numbers with units)',
long_description=readme,
author="Ken Kundert",
Expand Down

0 comments on commit 942fb64

Please sign in to comment.