Rutgersandmore
Rutgersandmore

Reputation: 1

Intuitive explanation for range of representable values

I'm a newbie and have recently started to read an introduction to floating-point number representations, which stated that the range of representable values in an arbitrary base b, for a minimum exponent value L and maximum exponent value U, can be found as follows:

How should these be understood and/or derived, explained for a newbie?

Upvotes: 0

Views: 82

Answers (1)

Eric Postpischil
Eric Postpischil

Reputation: 222660

Floating-point formats differ in some of their details and in how they are presented. Since the question does not specify these details, we have to infer some of the missing information.

Most commonly, the significand is normalized to the interval [1, b). However, given the information in the question, it looks like the normal interval is designated to be [1/b, 1).

In this case, a normal floating-point number consists of a sign (− or +), an exponent e in LeU, and a significand f in [1/b, 1) that is formed of p base-b digits after a radix point (such as .1738 for three base-8 digits after the “.”). The number represented by these parts is ± bef. (The t in the question has been changed to p here, short for precision.)

With these parameters, the smallest representable positive number has sign +, exponent L, and significand 1/b (formed from .1000…000b). The number this represents is + bL • 1/b = bL−1.

The greatest representable finite number has sign +, exponent U, and the largest significand, which is .nnnnnnb, where n is the digit b−1 and there are p digits. The value of .nnnnnnb equals the value of the geometric series .n + .0n + .00n + .000n + .000…n, which is 1−bp. Equivalently, we can see that .nnnnnnb + bp = .nnnnnnb + .000…001b = 1.000…000b = 1. This sign, exponent, and significand represent + bU • (1−bp).

Upvotes: 1

Related Questions