Utorrent Explained

0 views
Skip to first unread message

Kum Filteau

unread,
Aug 3, 2024, 5:04:10 PM8/3/24
to tespademu

While I was writing the Wolfenstein 3D book[1], I wanted to demonstrate how much of a handicap it was to work without floating points. My attempts at understanding floating points using canonical[2] articles[3] were met with resistance from my brain.

I tried to find a different way. Something far from $(-1)^S * 1.M * 2^(E-127)$ and its mysterious exponent/mantissa. Possibly a drawing since they seem to flow through my brain better.

I ended up with what follows and I decided to include it in the book. I am not claiming this is my invention but I have never seen floating points explained this way so far.I hope it will helps a few people like me who are a bit allergic to mathematic notations.

In the C language, floatsare 32-bit container following the IEEE 754 standard. Their purpose is to store and allowoperations on approximation of real numbers. The way I have seen them explained so far is as follow. The 32 bits are divided in three sections:

  • 1 bit S for the sign
  • 8 bits E for the exponent
  • 23 bits for the mantissa
Floating Point internals.The three sections of a floating point number.So far, so good. Now, how numbers are interpreted is usually explained with the formula:

$$ (-1)^S * 1.M * 2^(E-127) $$How everybody hates floating point to be explained to them.This is usually where I flip the table. Maybe I am allergic to mathematic notation but something just doesn't click when I read it. It feels like learningto draw a owl.
Floating-point arithmetic is considered an esoteric subject by many people.

- David Goldberg

Although correct, this way of explaining floating point will leaves some of us completelyclueless. Fortunately, there is a different way to explain it. Instead of Exponent, thinkof a Window between two consecutive power of two integers. Instead of a Mantissa, thinkof an Offset within that window.


The three sections of a floating Point number.The window tells within which two consecutive power-of-two the number will be: [0.5,1], [1,2], [2,4], [4,8] and so on (up to [$2^127$,$2^128$]). The offset divides the window in $ 2^23 = 8388608 $ buckets. With the window and the offset you can approximate a number. The window is an excellent mechanism to protect from overflowing. Once you have reached the maximum in a window (e.g [2,4]), you can "float" it right and represent the number within the next window (e.g [4,8]). It only costs a little bit of precision since the window becomes twice as large.

The next figure illustrates how the number 6.1 would be encoded. The window must start at 4 and span to next power of two, 8. The offset is about half way down the window.



Value 6.1 approximated with floating point.

Finally, there is September 17. On September 17, 1787, 39 of the convention's 55 delegates signed the United States Constitution at Independence Hall in Philadelphia. Of those 39, 16 went on to become U.S. senators.

In selecting an appropriate visual symbol of the Senate in its founding period, one might consider an anchor, a fence, or a saucer. Writing to Thomas Jefferson, who had been out of the country during the Constitutional Convention, James Madison explained that the Constitution's framers considered the Senate to be the great "anchor" of the government. To the framers themselves, Madison explained that the Senate would be a "necessary fence" against the "fickleness and passion" that tended to influence the attitudes of the general public and members of the House of Representatives. George Washington is said to have told Jefferson that the framers had created the Senate to "cool" House legislation just as a saucer was used to cool hot tea.

Perhaps Pennsylvania's James Wilson, a convention delegate, should have the last word on this anniversary. In the fall of 1787 he told the citizens of Philadelphia that he was amazed that the Senate had been created at all. "For my part, my admiration can only be equaled by my astonishment in beholding so perfect a system formed from such heterogeneous materials."

One of the most time-consuming tasks in clinical medicine is seeking the opinion of specialist colleagues. There is pressure not only to make referrals appropriate, but also to summarize the case in the language of the specialist. Cardiology Explained is an essential tool in this task. It explains the basic physiology and pathophysiologic mechanisms of cardiovascular disease in a straightforward and diagrammatic manner, gives guidelines as to when referral is appropriate, and, uniquely, explains what the specialist is likely to do. This facilitates an understanding of the specialty not available from standard textbooks. With wide appeal, this book is ideal for any hospital doctor, generalist, or even senior medical student who may need a cardiology opinion; or for that matter, anyone who simply wants some of cardiology - explained.

While every effort is made by the publisher to see that no inaccurate or misleading data, opinions, or statements appear in this book, they wish to make it clear that the material contained in the publication represents a summary of the independent evaluations and opinions of the authors. As a consequence, the authors, publisher, and any sponsoring company accept no responsibility for the consequences of any inaccurate or misleading data or statements. Neither do they endorse the content of the publication or the use of any drug or device in a way that lies outside its current licensed application in any territority.

The EUAA is working to upgrade its infrastructure. As a result, some business applications and portals will be unavailable between 30 July - 7 August 2024.
Some instability is also to be expected until 19 August 2024. We are doing our best to minimise the disruption, as we seek to provide you with a better experience.

This document outlines the general guidance and methodological framework, on which the EUAA country guidance documents are based. The country-specific common analysis and guidance notes should be read in conjunction with the 'Country Guidance: explained'.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages