summaryrefslogtreecommitdiff
path: root/devdocs/gcc~13/hex-floats.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-08-14 22:58:58 -0500
committerCraig Jennings <c@cjennings.net>2025-08-14 22:58:58 -0500
commit82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch)
tree158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/gcc~13/hex-floats.html
parent9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff)
downloaddotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz
dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/gcc~13/hex-floats.html')
-rw-r--r--devdocs/gcc~13/hex-floats.html6
1 files changed, 0 insertions, 6 deletions
diff --git a/devdocs/gcc~13/hex-floats.html b/devdocs/gcc~13/hex-floats.html
deleted file mode 100644
index 1e023a00..00000000
--- a/devdocs/gcc~13/hex-floats.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<div class="section-level-extent" id="Hex-Floats"> <div class="nav-panel"> <p> Next: <a href="fixed-point" accesskey="n" rel="next">Fixed-Point Types</a>, Previous: <a href="decimal-float" accesskey="p" rel="prev">Decimal Floating Types</a>, Up: <a href="c-extensions" accesskey="u" rel="up">Extensions to the C Language Family</a> [<a href="index#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="indices" title="Index" rel="index">Index</a>]</p> </div> <h1 class="section" id="Hex-Floats-1"><span>6.15 Hex Floats<a class="copiable-link" href="#Hex-Floats-1"> ¶</a></span></h1> <p>ISO C99 and ISO C++17 support floating-point numbers written not only in the usual decimal notation, such as <code class="code">1.55e1</code>, but also numbers such as <code class="code">0x1.fp3</code> written in hexadecimal format. As a GNU extension, GCC supports this in C90 mode (except in some cases when strictly conforming) and in C++98, C++11 and C++14 modes. In that format the ‘<samp class="samp">0x</samp>’ hex introducer and the ‘<samp class="samp">p</samp>’ or ‘<samp class="samp">P</samp>’ exponent field are mandatory. The exponent is a decimal number that indicates the power of 2 by which the significant part is multiplied. Thus ‘<samp class="samp">0x1.f</samp>’ is 1 15/16, ‘<samp class="samp">p3</samp>’ multiplies it by 8, and the value of <code class="code">0x1.fp3</code> is the same as <code class="code">1.55e1</code>. </p> <p>Unlike for floating-point numbers in the decimal notation the exponent is always required in the hexadecimal notation. Otherwise the compiler would not be able to resolve the ambiguity of, e.g., <code class="code">0x1.f</code>. This could mean <code class="code">1.0f</code> or <code class="code">1.9375</code> since ‘<samp class="samp">f</samp>’ is also the extension for floating-point constants of type <code class="code">float</code>. </p> </div><div class="_attribution">
- <p class="_attribution-p">
- &copy; Free Software Foundation<br>Licensed under the GNU Free Documentation License, Version 1.3.<br>
- <a href="https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Hex-Floats.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Hex-Floats.html</a>
- </p>
-</div>