Thread: How many distinct values?

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    How many distinct values?

    Hello everyone,


    My question is comes from when I write a C++ program. Not find suitable place to post. :-)

    My question comes from page 175 of Numerical Computation Guide. Here is a link,

    http://www.physics.ohio-state.edu/~d...point_math.pdf

    I do not know why if β = 2, p = 3, emin = -1 and emax = 2 there are
    16 distinct floating-point values in formular (1) in page 174? Are
    there any more general formular to calculate the distinct value for
    formular (1) for any given β, p, emin and emax?

    (sorry, I can not post math formular in this text box)


    thanks in advance,
    George

  2. #2
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    e is the exponent which can range -1 <= e <= 2 which gives 4 different exponent values. 2 raised to the 4th power is 16.

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks Thantos,


    I agree there are 4 exponent values. But how many significant values do you think there are?

    Quote Originally Posted by Thantos View Post
    e is the exponent which can range -1 <= e <= 2 which gives 4 different exponent values. 2 raised to the 4th power is 16.

    regards,
    George

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. putting values into an array
    By zdream8 in forum C Programming
    Replies: 15
    Last Post: 05-21-2008, 11:18 PM
  2. Replies: 1
    Last Post: 12-30-2007, 10:08 AM
  3. Count distinct array values
    By rkooij in forum C Programming
    Replies: 4
    Last Post: 10-03-2006, 03:03 AM
  4. Need help with project
    By chrisa777 in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2006, 05:01 PM
  5. Replies: 1
    Last Post: 02-03-2005, 03:33 AM