Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/ein16/synth/d2/test_compare.py
ViewVC logotype

Diff of /branches/ein16/synth/d2/test_compare.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4352, Wed Aug 3 03:55:33 2016 UTC revision 4356, Wed Aug 3 16:22:02 2016 UTC
# Line 42  Line 42 
42          if (o==0):          if (o==0):
43              break              break
44          else:          else:
45                if(abs(o-divConstant)<0.01):
46                    print "used div constant"
47                    break
48                else:
49              diff=abs(c-o)              diff=abs(c-o)
50              sumdiff+=diff              sumdiff+=diff
51              if(diff>maxdiff):              if(diff>maxdiff):
# Line 77  Line 81 
81              if(abs(o1-divConstant)<0.01):              if(abs(o1-divConstant)<0.01):
82                  print "used div constant"                  print "used div constant"
83                  break                  break
84                else:
85              diff=abs(o1-c1)              diff=abs(o1-c1)
86              sumdiff += diff              sumdiff += diff
87              if(diff > maxdiff):              if(diff > maxdiff):
88                  maxdiff = diff                  maxdiff = diff
89              #print("current maximal difference", maxdiff, "c: ", c1, " o:",o1)                  print("current maximal difference", maxdiff, "c: ", c1, " o:",o1)
90              if(c1==0):  
                 break  
91      print "made it here"      print "made it here"
92      return toStr(name,"x0", maxdiff,sumdiff/length)      return toStr(name,"x0", maxdiff,sumdiff/length)
93    

Legend:
Removed from v.4352  
changed lines
  Added in v.4356

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0