Commits

Jason S  committed ec133ba

removed temporary implementations to get from floating-point to fixed point

  • Participants
  • Parent commits 8f94b9e

Comments (0)

Files changed (1)

File sigmadeltatest3.py

     add1 = x - (y << 16)
     S1 = (add1 + S1) & 0x1ffff
 
-def sigmadeltamod2f0(xit):
-  S1 = 0
-  S2 = 0
-  for x in xit:
-    y = 1 if S2 >= 0 else 0
-    yield(y,x,S1,S2)
-    S2 += (S1-y)
-    S1 += (x-y)*0.5
-
-def sigmadeltamod2f1(xit):
-  S1 = 0
-  S2 = 0
-  for x in xit:
-    x16 = x*65536
-    y = 1 if S2 >= 0 else 0
-    yield(y,x16,S1,S2)
-    S2 += (S1-(y<<16))
-    S1 += (x16-(y<<16))*0.5
-
-def sigmadeltamod2f2(xit):
-  x16 = convertQ16(xit)
-  S1 = 0
-  S2 = 0
-  for x in x16:
-    y = 1 if S2 >= 0 else 0
-    yield(y,x,S1,S2)
-    S2 += ((S1>>1)-(y<<16))
-    S1 += x-(y<<16)
-
 def sat(x,xmin,xmax):
   return xmin if x < xmin else xmax if x > xmax else x