.
*as of ‘16 SEPTEMBER 2023’*
.
*in ‘computing’, floating point is the formulaic representation that approximates a real number so as to support a trade-off between ‘range’ + ‘precision’*
.
(a number is, in general, represented approximately to a fixed number of significant digits (the ‘significand’) and scaled using an exponent in some fixed base)
.
(the base for the scaling is normally 2 / 10 / 16)
.
(a number that can be represented exactly is of the following form…)
where significand ∈ Z, base is an integer ≥ 2, and exponent ∈ Z.
.
.
(for example…)
.
The term floating point refers to the fact that a number’s radix point (decimal point, or, more commonly in computers, binary point) can “float”)
(that is, it can be placed anywhere relative to the significant digits of the number)
This position is indicated as the exponent component, and thus the floating-point representation can be thought of as a kind of scientific notation
.
A floating-point system can be used to represent, with a fixed number of digits, numbers of different orders of magnitude…
e.g. the distance between galaxies or the diameter of an atomic nucleus can be expressed with the same unit of length
.
The result of this dynamic range is that the numbers that can be represented are not uniformly spaced
(the difference between two consecutive representable numbers grows with the chosen scale)
Over the years, a variety of floating-point representations have been used in computers.
(however, since the 1990s, the most commonly encountered representation is that defined by the ‘IEEE 754 Standard’)
.
(the ‘speed’ of ‘floating-point operations’ (commonly measured in terms of ‘FLOPS’), is an important characteristic of a ‘computer system’, especially for ‘applications’ that involve ‘intensive mathematical calculations’)
.
Floating point is one way to store a number with a decimal in it.
Say we’ve got five boxes and we can only store on number in each. Normally, that means we could store positive numbers from 0-99999. What if we want to store 1.5? On way is to use a “fixed point” method. We just decide that the decimal point goes between the 4th and 5th boxes. So now we can store numbers between 0.0 and 9999.9.
So now we can do basic stuff, but what happens when we want to store a price like 14.95? Fixed format is a pain here, we have to have magically decided ahead of time how many boxes to save for after the decimal point. What’s worse, every box after the decimal point lowers the maximum number we can keep track of.
So floating point saves one box to say WHERE the decimal point goes. Our biggest number is still 9999 (we’d store it as 9-9-9-9-0 where the 0 says there are zero numbers after the decimal point) but our smallest (that isn’t zero) is now 0.0001 (which we’d store as 0-0-0-1-4. We cheat and just leave off the first zero).
Our 14.95 example is stored as 1-4-9-5-2
.
.
*👨🔬🕵️♀️🙇♀️*SKETCHES*🙇♂️👩🔬🕵️♂️*
.
.
.
.
.
💕💝💖💓🖤💙🖤💙🖤💙🖤❤️💚💛🧡❣️💞💔💘❣️🧡💛💚❤️🖤💜🖤💙🖤💙🖤💗💖💝💘
.
.
*🌈✨ *TABLE OF CONTENTS* ✨🌷*
.
.
🔥🔥🔥🔥🔥🔥*we won the war* 🔥🔥🔥🔥🔥🔥