1
$\begingroup$

I am reading over the article found here specifically §D.4.4 Exceptions, Flags and Trap Handlers and am confused by the table D-4 in that section.

Specifically the arguments sent to the trap handler for the overflow and and underflow exceptions.

It shows round(x2-α) as the argument for both the over and underflow conditions (EDIT: It is not). I am not sure what x2 is at all, I see no reference to it in the section.

As for α footnote says:

*xis the exact result of the operation, α= 192 for single precision, 1536 for double, and xmax= 1.11 …11 ×2^e_max.

So it says "α = 192 for single precision, 1536 for double" which is also confusing. Where do these values come from?

I am not looking for anything super in-depth, just something succinct.

$\endgroup$
3
$\begingroup$

Your problem is typographical. Look at a well-formatted copy and it should all make sense. So for example, the argument to the trap handler on overflow is $\hbox{round}(x 2^{-\alpha})$, where $x$ is the exact value.

The value of $\alpha$ comes from the fact that the exponent is 8 bits in binary32 (previously called "single") and 11 bits in binary64 (previously called "double"). You can think of $\alpha$ as an unsigned integer the size of the exponent field, with the two most significant bits set. Why it would be that number in particular is left as an exercise; think the possible range of an overflowing operation and what would be required to rescale it back into a representable range.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.