bookmarks  1

  •  

    This routine will take an 8 bit integer that corresponds to the numerator of a fraction whose denominator is 256 and find its arctangent. So the input ranges from 0 to 255 which corresponds to 0 to 255/256 = 0.996 . The output for an arctangent routine that returns a floating point number would be from 0 (atan(0)) to 0.783 (atan(255/256)) radians; or if you prefer, 0 to 44.89 degrees. However, this routine scales the output so that pi/4 radians (or 45 degrees) corresponds to 256. So for the input range of 0 to 255 you get an output of 0 to 255 ( atan(255/256) * 256 / (pi/4) is about 255). It's probably a little more interesting to see an intermediate data point or two:
    14 years ago by @jaeschke
    (0)
     
     
  • ⟨⟨
  • 1
  • ⟩⟩

publications  

    No matching posts.
  • ⟨⟨
  • ⟩⟩