Single-precision floating-point format Range -


sign = 1 bit, biased exponent = 8 bits, mantissa = 23 bits

what positive , negative possible range? teacher told me following range:

-0.5*2^-128 -(1-2^-24)*2^127 (for negative floating point numbers)  0.5*2^-128 (1-2^-24)*2^127 (for positive floating point numbers) 

but don't find range correct because not able understand how store 0.5 * 2-128 format. please explain.

firstly, floating-point number format symmetric positive , negative numbers. @ positive case.

the maximum positive number has maximum mantissa 1.111111111111111111111112 , maximum non-infinite exponent 127. 1.111111111111111111111112 × 2127 = (2 − 2−23) × 2127 ≈ 3.402 × 1038 ≈ 2128.

the minimum positive number has non-zero mantissa 0.000000000000000000000012 , minimum exponent −126 subnormal/denormalized numbers. 0.000000000000000000000012 × 2−126 = 2−23 × 2−126 = 2−149 ≈ 1.401 × 10−45.

further reading: https://en.wikipedia.org/wiki/single-precision_floating-point_format


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -