Discussing the article: "From Basic to Intermediate: Floating point"

 

Check out the new article: From Basic to Intermediate: Floating point.

This article is a brief introduction to the concept of floating-point numbers. Since this text is very complex please, read it attentively and carefully. Do not expect to quickly master the floating-point system. It only becomes clear over time, as you gain experience using it. But this article will help you understand why your application sometimes produces results different from what you expect.

It is clear that numbers with fractional values such as 2,5 are always very easy to understand, since no one will confuse this type of values with any other. But, my dear reader, when it comes to calculations, things are not so simple. In fact, floating-point numbers are quite useful in a number of situations. However, they should not be considered or understood in the same way as integers.

Basically, many of you might be used to dealing with floating-point numbers in two types of notation: scientific one where we note values like 1-e2, and the more common arithmetic one where we note values like 0.01. Both values are equal in magnitude, but are noted differently. Likewise, there is a fractional way of noting the same value, which will be equal to 1/100.

Please note that in all cases we are talking about the same value. However, different programs or programming languages handle these values differently.

From Basic to Intermediate: Floating point


Author: CODE X

 

What's up with the pictures? The original Portuguese version is correct:





But the Russian and Spanish versions have broken pictures: