Leave these fields empty (spam trap):
You can leave this blank to post anonymously, or you can create a Tripcode by using the format Name#Password
[i]Italic Text[/i]
[b]Bold Text[/b]
[spoiler]Spoiler Text[/spoiler]
>Highlight/Quote Text
[pre]Preformatted & Monospace Text[/pre]
[super]Superset Text[/super]
[sub]Subset Text[/sub]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists


420chan is Getting Overhauled - Changelog/Bug Report/Request Thread (Updated March 22)
Floating Point Numbers by Jarvis Wonkinwill - Tue, 31 Jul 2018 18:41:40 EST ID:JrM6mJRf No.37608 Ignore Report Quick Reply
File: 1533076900708.jpg -(6453B / 6.30KB, 188x250) Thumbnail displayed, click image for full size. 6453
can someone explain wtf Floating Point Numbers are?
Fuck Blytheham - Wed, 01 Aug 2018 05:09:32 EST ID:cIyjo+iF No.37609 Ignore Report Quick Reply
It's a fraction and an exponent and usually a sign. It's kind of like scientific notation with the goal of sacrificing precision so you can load and operate on the numbers efficiently in hardware. FP is used pretty much everywhere except finance where the lack of precision will get you sued.
Jenny Dartdock - Thu, 02 Aug 2018 01:58:27 EST ID:Xm/W+3lL No.37610 Ignore Report Quick Reply

The IEEE754 floating-point standard that pretty much everyone uses was created with the goal of being able to re-use many per-existing hardware pieces, and you'll find that some of the integer hardware still works on it (equality, sign bits, zero, and addition, subtraction, less-than, and greater-than are all mostly compatible), however new hardware was required for it (such as hardware that handles floating point exceptions, denormal numbers, infinities and NaNs).

However, as it turns out different pieces of hardware handle floating point numbers differently. GPUs, for instance, get to follow most of the rules of the spec while ignoring some other rules that allow them to accelerate their hardware greatly while still remaining mostly compatible:
Rebecca Socklefoot - Sat, 04 Aug 2018 00:05:05 EST ID:x6K3CZQk No.37616 Ignore Report Quick Reply
Watch the floating point lecture
Jenny Fuckingcocke - Thu, 01 Nov 2018 03:05:45 EST ID:E/AtBUMC No.37667 Ignore Report Quick Reply
A floating point number is of course bits in memory.
The first bit is the sign bit. 0 means the number is negative, 1 means the number is positive. Note that this is the opposite from how negative integers are usually represented in binary (two's complement).

Next after the sign comes the exponent. it's either 8 or 11 bits long depending on if the floating point is a float or a double (32 or 64 bits in total).
This exponent is biased, which means there is an implicit value that is subtracted from the unsigned binary integer value the exponent has. For 32 bit floats the bias is IIRC -127, so an exponent of 00000001 (binary) is
-126, 10000000 binary is 1 etc. the exponent shouldn't have an exponent value of all 0s or 1s, those are for denoting special cases such as NaN, infinities and other stuff.

The last part is the significand. This is somewhat like your normal integer value: Each bit on the left means double the value of the bit on the right. The difference is that the leftmost bit means value 0.5, the next is 0.25 etc.
Also an implicit 1 is added (another bias if you will). Knowing some math you know that the significand value is always between 1 (included) and 2 (excluded).

Finally the value of the floating point number is
(-1)^sign * 2^exponent * significand.

The sign part is just mathematical notation "if sign is 1, then negative, otherwise positive". Remember the biases in exponent and significand.

So a

0 10000010 11010000000000000000000 would be

sign: positive
exponent: 128+2 -127 = 3
significand: 0.5 + 0.25 + 0.0625 = 0.8125

and the final value: 2^3 * 0.8125 = 6.5

Report Post
Please be descriptive with report notes,
this helps staff resolve issues quicker.