https://community.bistudio.com/wiki?title=Floating_Point_Number&feed=atom&action=historyFloating Point Number - Revision history2024-03-28T12:14:24ZRevision history for this page on the wikiMediaWiki 1.39.0https://community.bistudio.com/wiki?title=Floating_Point_Number&diff=337263&oldid=prevLou Montana: Text replacement - "<code>" to "<code style="display: block">"2023-01-11T10:53:30Z<p>Text replacement - "<code>" to "<code style="display: block">"</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 11:53, 11 January 2023</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l13">Line 13:</td>
<td colspan="2" class="diff-lineno">Line 13:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Floating Point Literals ==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Floating Point Literals ==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>While a variable is a name that can represent different values during the execution of the program, a literal refers to the value itself. Long float literals are shortened by using an exponent component, which closely resembles scientific notation. Therefore, it is possible for a single float to contain an integer component, a decimal point, a fractional component, and an exponent component.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>While a variable is a name that can represent different values during the execution of the program, a literal refers to the value itself. Long float literals are shortened by using an exponent component, which closely resembles scientific notation. Therefore, it is possible for a single float to contain an integer component, a decimal point, a fractional component, and an exponent component.</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><code>decimal -> 1134121</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><code <ins style="font-weight: bold; text-decoration: none;">style="display: block"</ins>>decimal -> 1134121</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>scientific notation -> 1.13412 x 10^6</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>scientific notation -> 1.13412 x 10^6</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>float -> 1.13412e6</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>float -> 1.13412e6</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l20">Line 20:</td>
<td colspan="2" class="diff-lineno">Line 20:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''NOTE:''' In the same way scientific notation can still be used to represent small integers, floats of a reasonable size can still be represented with an exponent component of e0, but it would be cut off, and the user would be unaware.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''NOTE:''' In the same way scientific notation can still be used to represent small integers, floats of a reasonable size can still be represented with an exponent component of e0, but it would be cut off, and the user would be unaware.</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><code>decimal -> 19</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><code <ins style="font-weight: bold; text-decoration: none;">style="display: block"</ins>>decimal -> 19</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>scientific notation -> 19 x 10^0 (any number multiplied to the 0th power is 1)</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>scientific notation -> 19 x 10^0 (any number multiplied to the 0th power is 1)</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>float -> 19e0</code></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>float -> 19e0</code></div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l26">Line 26:</td>
<td colspan="2" class="diff-lineno">Line 26:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Floating Point Numbers in Arma ==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Floating Point Numbers in Arma ==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>A very simple formula is used to calculate floats in [[Real_Virtuality]]. It is (+/-)1 integer, decimal point, 5 integers as the fractional component, e,(+/-)3 integers representing the exponent component. If the beginning integer is negative, the negative symbol will be added, but if it is positive, it will be dropped. In the exponent component, positive and negative is always shown. If the resulting shortened value would go further than the hundred-thousandth's decimal place, it will be rounded at the hundred-thousandth's decimal place, this is why numbers of larger magnitude lose precision. Numbers start getting shortened once they reach the millions, thus, 999999 is the largest unshortened number than can be shown. 1000000 will be shown as 1e+006.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>A very simple formula is used to calculate floats in [[Real_Virtuality]]. It is (+/-)1 integer, decimal point, 5 integers as the fractional component, e,(+/-)3 integers representing the exponent component. If the beginning integer is negative, the negative symbol will be added, but if it is positive, it will be dropped. In the exponent component, positive and negative is always shown. If the resulting shortened value would go further than the hundred-thousandth's decimal place, it will be rounded at the hundred-thousandth's decimal place, this is why numbers of larger magnitude lose precision. Numbers start getting shortened once they reach the millions, thus, 999999 is the largest unshortened number than can be shown. 1000000 will be shown as 1e+006.</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><code>'''An example of a floating point literal in Arma:'''</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><code <ins style="font-weight: bold; text-decoration: none;">style="display: block"</ins>>'''An example of a floating point literal in Arma:'''</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>unshortened -> 12390828</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>unshortened -> 12390828</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>shortened -> 1.23908e+008</code></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>shortened -> 1.23908e+008</code></div></td></tr>
</table>Lou Montanahttps://community.bistudio.com/wiki?title=Floating_Point_Number&diff=86798&oldid=prevDreadedEntity at 05:14, 7 December 20142014-12-07T05:14:27Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 06:14, 7 December 2014</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l7">Line 7:</td>
<td colspan="2" class="diff-lineno">Line 7:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>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.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>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.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Floating-point representation is able to represent an integer that has a large magnitude, but the precision suffers due to rounding. Conversely, a floating-point representation is also able to represent a very small magnitude, with extreme precision. Floats <del style="font-weight: bold; text-decoration: none;">becoming </del>less precise due to rounding as they grow larger, while smaller floats gain precision the smaller their magnitude.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Floating-point representation is able to represent an integer that has a large magnitude, but the precision suffers due to rounding. Conversely, a floating-point representation is also able to represent a very small magnitude, with extreme precision. Floats <ins style="font-weight: bold; text-decoration: none;">become </ins>less precise due to rounding as they grow larger, while smaller floats gain precision the smaller their magnitude.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>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.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>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.</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l25">Line 25:</td>
<td colspan="2" class="diff-lineno">Line 25:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Floating Point Numbers in Arma ==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Floating Point Numbers in Arma ==</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>A very simple formula is used to calculate floats in [[Real_Virtuality]]. It is (+/-)1 integer, decimal point, 5 integers as the fractional component, e,(+/-)3 integers representing the exponent component. If the beginning integer is negative, the negative symbol will be added, but if it is positive, it will be dropped. In the exponent component, positive and negative is always shown.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>A very simple formula is used to calculate floats in [[Real_Virtuality]]. It is (+/-)1 integer, decimal point, 5 integers as the fractional component, e,(+/-)3 integers representing the exponent component. If the beginning integer is negative, the negative symbol will be added, but if it is positive, it will be dropped. In the exponent component, positive and negative is always shown<ins style="font-weight: bold; text-decoration: none;">. If the resulting shortened value would go further than the hundred-thousandth's decimal place, it will be rounded at the hundred-thousandth's decimal place, this is why numbers of larger magnitude lose precision. Numbers start getting shortened once they reach the millions, thus, 999999 is the largest unshortened number than can be shown. 1000000 will be shown as 1e+006</ins>.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><code>'''An example of a floating point literal in Arma:'''</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><code>'''An example of a floating point literal in Arma:'''</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">decimal </del>-> 12390828</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">unshortened </ins>-> 12390828</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">float </del> -> 1.23908e+008</code></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">shortened </ins> -> 1.23908e+008</code></div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>'''NOTE:''' The highest number that can be shown by Arma is 1e+038 or 99999999999999999999999999999999999999 (38 9's).<br></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">'''NOTE:''' If there are any zeros at the end of the fractional component, they will be dropped. This can also be observed when the rounding causes the hundred-thousandth's decimal place to round up from 9 to 0 and is subsequently dropped.</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>'''NOTE:''' The highest number that can be shown by Arma is 1e+038 or 99999999999999999999999999999999999999 (38 9's)<ins style="font-weight: bold; text-decoration: none;">. Anything larger than that will be shown as 1#INF</ins>.<br></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''NOTE:''' When attempting to observe the number in any way ([[hint]], [[copyToClipboard]], [[diag_log]]), it is shorted to Xe+000 (X is your value), causing it to be rounded to 6 digits.<br></div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''NOTE:''' When attempting to observe the number in any way ([[hint]], [[copyToClipboard]], [[diag_log]]), it is shorted to Xe+000 (X is your value), causing it to be rounded to 6 digits.<br></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''NOTE:''' Despite rounding the number and displaying it as a shortened literal, the engine '''seems to keep the actual value stored in RAM'''.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''NOTE:''' Despite rounding the number and displaying it as a shortened literal, the engine '''seems to keep the actual value stored in RAM'''.</div></td></tr>
</table>DreadedEntityhttps://community.bistudio.com/wiki?title=Floating_Point_Number&diff=86787&oldid=prevBenargee: __TOC__2014-12-06T07:39:41Z<p>__TOC__</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 08:39, 6 December 2014</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">__TOC__</ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Floating Point Number ==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Floating Point Number ==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''Floating point numbers (floats)''' are numbers which contain an integer component, a decimal point, and a fractional component. Since computers do not read fractions, floats are commonly used to represent the results of multiplication and division of integers, and are very useful. Floats are denoted as numbers with a decimal place or through the use of literals if they get too long. While leaving numbers in fraction form when doing math by hand is more efficient, multiplication and division inside a CPU is very different, usually requiring many more clock cycles than simple addition or subtraction, therefore it is much more efficient for a computer to create an absolute value, rather than recalculating each time the values are used.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>'''Floating point numbers (floats)''' are numbers which contain an integer component, a decimal point, and a fractional component. Since computers do not read fractions, floats are commonly used to represent the results of multiplication and division of integers, and are very useful. Floats are denoted as numbers with a decimal place or through the use of literals if they get too long. While leaving numbers in fraction form when doing math by hand is more efficient, multiplication and division inside a CPU is very different, usually requiring many more clock cycles than simple addition or subtraction, therefore it is much more efficient for a computer to create an absolute value, rather than recalculating each time the values are used.</div></td></tr>
</table>Benargeehttps://community.bistudio.com/wiki?title=Floating_Point_Number&diff=86781&oldid=prevDreadedEntity: Created page with "== Floating Point Number == '''Floating point numbers (floats)''' are numbers which contain an integer component, a decimal point, and a fractional component. Since computers ..."2014-12-05T23:40:58Z<p>Created page with "== Floating Point Number == '''Floating point numbers (floats)''' are numbers which contain an integer component, a decimal point, and a fractional component. Since computers ..."</p>
<p><b>New page</b></p><div>== Floating Point Number ==<br />
'''Floating point numbers (floats)''' are numbers which contain an integer component, a decimal point, and a fractional component. Since computers do not read fractions, floats are commonly used to represent the results of multiplication and division of integers, and are very useful. Floats are denoted as numbers with a decimal place or through the use of literals if they get too long. While leaving numbers in fraction form when doing math by hand is more efficient, multiplication and division inside a CPU is very different, usually requiring many more clock cycles than simple addition or subtraction, therefore it is much more efficient for a computer to create an absolute value, rather than recalculating each time the values are used.<br />
<br />
'''FLOPS''' ('''FL'''oating-point '''O'''perations '''P'''er '''S'''econd) is a measure of computer performance, useful in fields of scientific calculations that make heavy use of floating-point calculations. For such cases it is a more accurate measure than instructions per second.<br />
<br />
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.<br />
<br />
Floating-point representation is able to represent an integer that has a large magnitude, but the precision suffers due to rounding. Conversely, a floating-point representation is also able to represent a very small magnitude, with extreme precision. Floats becoming less precise due to rounding as they grow larger, while smaller floats gain precision the smaller their magnitude.<br />
<br />
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.<br />
<br />
== Floating Point Literals ==<br />
While a variable is a name that can represent different values during the execution of the program, a literal refers to the value itself. Long float literals are shortened by using an exponent component, which closely resembles scientific notation. Therefore, it is possible for a single float to contain an integer component, a decimal point, a fractional component, and an exponent component.<br />
<code>decimal -> 1134121<br />
scientific notation -> 1.13412 x 10^6<br />
float -> 1.13412e6<br />
float -> 1 . 13412 e6<br />
breakdown -> integer component | decimal point | fractional component | exponent component</code><br />
<br />
'''NOTE:''' In the same way scientific notation can still be used to represent small integers, floats of a reasonable size can still be represented with an exponent component of e0, but it would be cut off, and the user would be unaware.<br />
<code>decimal -> 19<br />
scientific notation -> 19 x 10^0 (any number multiplied to the 0th power is 1)<br />
float -> 19e0</code><br />
<br />
== Floating Point Numbers in Arma ==<br />
A very simple formula is used to calculate floats in [[Real_Virtuality]]. It is (+/-)1 integer, decimal point, 5 integers as the fractional component, e,(+/-)3 integers representing the exponent component. If the beginning integer is negative, the negative symbol will be added, but if it is positive, it will be dropped. In the exponent component, positive and negative is always shown.<br />
<code>'''An example of a floating point literal in Arma:'''<br />
decimal -> 12390828<br />
float -> 1.23908e+008</code><br />
'''NOTE:''' The highest number that can be shown by Arma is 1e+038 or 99999999999999999999999999999999999999 (38 9's).<br><br />
'''NOTE:''' When attempting to observe the number in any way ([[hint]], [[copyToClipboard]], [[diag_log]]), it is shorted to Xe+000 (X is your value), causing it to be rounded to 6 digits.<br><br />
'''NOTE:''' Despite rounding the number and displaying it as a shortened literal, the engine '''seems to keep the actual value stored in RAM'''.</div>DreadedEntity