Commit 335fc428 authored by Margret A. Riegert's avatar Margret A. Riegert
Browse files

Fix tabs/spaces in all qos.py


Former-commit-id: 21f90373dbf633be3f26941ef7805f4574fa5936 [formerly 4984e2cfd65e6e939cd06de2c7a1f44484634d3e]
Former-commit-id: bf6b107e513a2a7b8a4bc894bfe2712af9b4b53c
parent fa7711ed
......@@ -41,19 +41,19 @@ for i in range(len(origLines)):
origPrice = float(origLine)
nnPrice = float(nnLine)
nominator = abs(origPrice - nnPrice)
denominator = abs(origPrice)
if(denominator == 0):
e = 1.0
elif(math.isnan(nominator) or (math.isnan(denominator))):
e = 1.0
elif ((nominator / denominator > 1)):
e = 1.0
else:
e = nominator / denominator
absError += e
nominator = abs(origPrice - nnPrice)
denominator = abs(origPrice)
if(denominator == 0):
e = 1.0
elif(math.isnan(nominator) or (math.isnan(denominator))):
e = 1.0
elif ((nominator / denominator > 1)):
e = 1.0
else:
e = nominator / denominator
absError += e
pass;
print(bcolors.FAIL + "*** Error: %1.8f" % (absError/float(len(origLines))) + bcolors.ENDC)
......@@ -52,7 +52,7 @@ for i in range(len(origLines)):
denominator = math.sqrt(origReal*origReal + origImag*origImag)
if(denominator == 0):
e = 1.0
e = 1.0
elif(math.isnan(nominator) or (math.isnan(denominator))):
e = 1.0
elif ((nominator / denominator > 1)):
......
......@@ -43,24 +43,24 @@ for i in range(len(origLines)):
origItem2 = float(origLine.split("\t")[1])
nnItem1 = float(nnLine.split("\t")[0])
nnItem2 = float(nnLine.split("\t")[1])
nnItem2 = float(nnLine.split("\t")[1])
diff1 = origItem1 - nnItem1
diff2 = origItem2 - nnItem2
diff1 = origItem1 - nnItem1
diff2 = origItem2 - nnItem2
nominator = math.sqrt(diff1*diff1 + diff2*diff2)
denominator = math.sqrt(origItem1*origItem1 + origItem2*origItem2)
nominator = math.sqrt(diff1*diff1 + diff2*diff2)
denominator = math.sqrt(origItem1*origItem1 + origItem2*origItem2)
if(denominator == 0):
e = 1.0
elif(math.isnan(nominator) or (math.isnan(denominator))):
e = 1.0
elif ((nominator / denominator > 1)):
e = 1.0
else:
e = nominator / denominator
if(denominator == 0):
e = 1.0
elif(math.isnan(nominator) or (math.isnan(denominator))):
e = 1.0
elif ((nominator / denominator > 1)):
e = 1.0
else:
e = nominator / denominator
absError += e
absError += e
pass;
print(bcolors.FAIL + "*** Error: %1.8f" % (absError/len(origLines)) + bcolors.ENDC)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment