Determining 'realmax' and 'realmin'

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 2K views
KennyRodgers
Messages
8
Reaction score
1
Summary:: figuring the 'realmax' and 'realmin' from a hypothetical distribution of bits

I am attempting to figure the 'realmax' and the 'realmin' from this hypothetical distribution of bits.
Capture.PNG

I know the largest the mantissa can be is (1-eps), and the smallest is just 1/2. Also I note the restriction on m. I want to convert m so it is in the range from [1,2]. So m' = m*2.
However, I am not sure if I need to recalculate the exponent range to accommodate 3 bits for 0, infinity and NAN. Thus I keep thinking the exponent range should be 256 - 2 = 254 -> 254/2 = 127 -> -126 < n < 127 where -127 is reserved for 0. Also, 256 and 255 are reserved for infinity and Nan, thus we have 256 - 2

I think realmax = (1-eps)*2*2^(127) = (1-eps)*2^(128)
and realmin = (0.5)*2*2^(-126) = 2^(-126)

Thoughts?
 
Physics news on Phys.org
KennyRodgers said:
Thoughts?
You are confusing the situation in the question with other things you have learned about floating point. The question doesn't say anything about NaN, Infinity or an offset exponent, it gives you maximum and minimum bounds for ## m ## and ## n ## and an expression to substitute them into.

Do you think that a correct answer would be stated in terms of your value "eps", or is an actual number required?
 
  • Like
Likes   Reactions: jim mcnamara
pbuk said:
You are confusing the situation in the question with other things you have learned about floating point. The question doesn't say anything about NaN, Infinity or an offset exponent, it gives you maximum and minimum bounds for ## m ## and ## n ## and an expression to substitute them into.

Do you think that a correct answer would be stated in terms of your value "eps", or is an actual number required?
After some clarification from a peer, I find that you are correct; no NaN, infinity or offset. essentially I was overthinking.
'realmax' is just (1-eps)*2^(127) ≈ 2^(127) and 'realmin' = (0.5)*2^(-128) = 2^(-129)
we did not need to state the value of "eps" for 'realmin' or 'realmax', but the last question does ask for the value of eps, which is just eps = 2^(-55)
 
  • Like
Likes   Reactions: pbuk