# How many distinct values?

• 05-03-2008
George2
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)

George
• 05-03-2008
Thantos
e is the exponent which can range -1 <= e <= 2 which gives 4 different exponent values. 2 raised to the 4th power is 16.
• 05-03-2008
George2
Thanks Thantos,

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

Quote:

Originally Posted by Thantos
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