Best way to get the square root of a 16/32 bit unsigned integer


Results 1 to 4 of 4

Threaded View

  1. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by sougata View Post
    find the square root of a 16bit number
    Since it's only a 16 bit number, maybe you'd be best off using a lookup table. After all, there are only 255 integer numbers of squares inside of 16 bits...

    EDIT: Whoops! Just saw that the title said 16/32 bit sqrt instead of 16 bit only.

    But...I'd say, same thing still applies. Could easily get the sqrt of the upper 16 bits of the 32 bits using a lookup table. Then depending on the accuracy required, interpolate the lower 16 bits.
    Last edited by skimask; - 17th March 2008 at 19:14.

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  2. How to receive stream of bytes using PIC USART
    By unifoxz in forum mel PIC BASIC Pro
    Replies: 34
    Last Post: - 20th June 2009, 10:38
  3. 32 bit square root
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 6th May 2009, 03:37
  4. PICBasic newbie problem
    By ELCouz in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 12th February 2008, 00:55
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 01:07

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts