Determining 'realmax' and 'realmin'

AI Thread Summary
The discussion focuses on determining 'realmax' and 'realmin' from a hypothetical bit distribution. The initial confusion involved the inclusion of NaN, infinity, and exponent offsets, which were deemed unnecessary for the calculations. After clarification, 'realmax' was simplified to (1-eps)*2^(127), approximating to 2^(127), while 'realmin' was calculated as (0.5)*2^(-128), equating to 2^(-129). The value of "eps" was identified as 2^(-55), but it was clarified that it was not needed for the maximum and minimum calculations. Ultimately, the focus shifted to the correct application of the given bounds without overcomplicating the problem.
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 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 pbuk

Similar threads

Back
Top