home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / mac / programm / 18595 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  991 b 

  1. Path: sparky!uunet!kithrup!stanford.edu!agate!biosci!uwm.edu!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!cc4b+
  2. From: cc4b+@andrew.cmu.edu (Christopher Brian Cox)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: FAST fixed point math?
  5. Message-ID: <Qf2aTW600Vpc4_Vl1D@andrew.cmu.edu>
  6. Date: 18 Nov 92 15:57:22 GMT
  7. Organization: Senior, Physics, Carnegie Mellon, Pittsburgh, PA
  8. Lines: 19
  9.  
  10. (mail to cs.oberlin.edu bounced for 4 days, so I'll post this to the bboard)
  11.  
  12. response to  mhall@mark1.cs.oberlin.edu message:
  13.  
  14. If the samples are all -127..128 , then do the whole thing in integer math.
  15. Also, with this small a range you could do the multiplies with look up tables.
  16.  
  17. preinit:
  18. Q[i] = r*a*[-127..128]
  19. R[i] = r*b*[-127..128]
  20.  
  21. in loop:
  22. xTemp = Q[x] - R[y]
  23. y = R[x] + Q[y]
  24.  
  25. Also, unroll the loops as much as possible  (if you are doing a fixed
  26. number of iterations (ie:fft) then you can unroll it exactly.
  27.  
  28. Chris
  29.