Author: varioustoxins
Date: Wed Nov 8 00:17:53 2006
New Revision: 2768
URL: http://svn.gna.org/viewcvs/relax?rev=2768&view=rev
Log:
fixed bug 7641 Infinite Chi2 warning
bug #7641 http://gna.org/bugs/?7641
https://mail.gna.org/public/relax-devel/2006-11/msg00078.html
Modified:
1.2/float.py
Modified: 1.2/float.py
URL:
http://svn.gna.org/viewcvs/relax/1.2/float.py?rev=2768&r1=2767&r2=2768&view=diff
==============================================================================
--- 1.2/float.py (original)
+++ 1.2/float.py Wed Nov 8 00:17:53 2006
@@ -154,7 +154,7 @@
if isFinite(float):
# check and store is positive
positive = isPositive(float)
- if isZero():
+ if isZero(float):
if positive:
result = CLASS_POS_ZERO
else:
@@ -178,7 +178,7 @@
result = CLASS_POS_INF
elif isNegInf(float):
result = CLASS_NEG_INF
-
+ return result
def packBytesAsPyFloat(bytes):
@@ -612,16 +612,19 @@
# if exponent is not all ones this can't be a Inf
if not isExpAllOnes(obj):
result = False
-
- # get the mantissa as a byte array properly masked
- manBytes = getMantissaBytes(obj)
-
- for byte in manBytes:
- #check if any of the unmasked mantissa bytes are zero
- # to be a NaN the mantissa must be zero
- if byte > 0:
- return False
- return True
+ else:
+ # get the mantissa as a byte array properly masked
+ manBytes = getMantissaBytes(obj)
+
+ for byte in manBytes:
+ #check if any of the unmasked mantissa bytes are zero
+ # to be a NaN the mantissa must be zero
+ if byte > 0:
+ result = False
+ break
+ result = True
+
+ return result
def isPosInf(obj):
''' check to see if a python float is positive infinity
_______________________________________________
relax (http://nmr-relax.com)
This is the relax-commits mailing list
relax-commits@xxxxxxx
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits