neingeist
/
arduinisten
Archived
1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

103 lines
4.2 KiB
HTML

<html lang="en">
<head>
<title>Flonums - Using as</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using as">
<meta name="generator" content="makeinfo 4.7">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Numbers.html#Numbers" title="Numbers">
<link rel="prev" href="Bignums.html#Bignums" title="Bignums">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This file documents the GNU Assembler "as".
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002,
2006, 2007 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
section entitled ``GNU Free Documentation License''.
man end-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family: serif; font-weight: normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Flonums"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="Bignums.html#Bignums">Bignums</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Numbers.html#Numbers">Numbers</a>
<hr><br>
</div>
<h5 class="subsubsection">3.6.2.3 Flonums</h5>
<p><a name="index-flonums-181"></a><a name="index-floating-point-numbers-182"></a><a name="index-constants_002c-floating-point-183"></a>
<a name="index-precision_002c-floating-point-184"></a>A <dfn>flonum</dfn> represents a floating point number. The translation is
indirect: a decimal floating point number from the text is converted by
<span class="command">as</span> to a generic binary floating point number of more than
sufficient precision. This generic floating point number is converted
to a particular computer's floating point format (or formats) by a
portion of <span class="command">as</span> specialized to that computer.
<p>A flonum is written by writing (in order)
<ul>
<li>The digit <span class="samp">0</span>.
(<span class="samp">0</span> is optional on the HPPA.)
<li>A letter, to tell <span class="command">as</span> the rest of the number is a flonum.
<kbd>e</kbd> is recommended. Case is not important.
<p>On the H8/300, Renesas / SuperH SH,
and AMD 29K architectures, the letter must be
one of the letters <span class="samp">DFPRSX</span> (in upper or lower case).
<p>On the ARC, the letter must be one of the letters <span class="samp">DFRS</span>
(in upper or lower case).
<p>On the Intel 960 architecture, the letter must be
one of the letters <span class="samp">DFT</span> (in upper or lower case).
<p>On the HPPA architecture, the letter must be <span class="samp">E</span> (upper case only).
<li>An optional sign: either <span class="samp">+</span> or <span class="samp">-</span>.
<li>An optional <dfn>integer part</dfn>: zero or more decimal digits.
<li>An optional <dfn>fractional part</dfn>: <span class="samp">.</span> followed by zero
or more decimal digits.
<li>An optional exponent, consisting of:
<ul>
<li>An <span class="samp">E</span> or <span class="samp">e</span>.
<!-- I can't find a config where "EXP_CHARS" is other than 'eE', but in -->
<!-- principle this can perfectly well be different on different targets. -->
<li>Optional sign: either <span class="samp">+</span> or <span class="samp">-</span>.
<li>One or more decimal digits.
</ul>
</ul>
<p>At least one of the integer part or the fractional part must be
present. The floating point number has the usual base-10 value.
<p><span class="command">as</span> does all processing using integers. Flonums are computed
independently of any floating point hardware in the computer running
<span class="command">as</span>.
</body></html>