Skip to content

Commit

Permalink
Avoid engineering format of numbers in normal text and fix lexer rule…
Browse files Browse the repository at this point in the history
… name
  • Loading branch information
henrikt-ma committed Nov 23, 2020
1 parent 3f01b5d commit 89f7426
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions chapters/lexicalstructure.tex
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,10 @@ \section{Literal Constants}\label{literal-constants}

\subsection{Floating Point Numbers}\label{floating-point-numbers}

A floating point number is expressed as a decimal number in the form of
a sequence of decimal digits followed by a decimal point, followed by decimal digits,
followed by an exponent indicated by E or e followed by a sign
and one or more decimal digits. The various parts can be omitted, see \lstinline!UNSIGNED_REAL! in~\cref{lexical-conventions} for
details and also the examples below. The minimal recommended range is
that of IEEE double precision floating point numbers, for which the
largest representable positive number is 1.7976931348623157E+308 and the
smallest positive number is 2.2250738585072014E-308. For example, the
following are floating point number literal constants:
A floating point number is expressed as a decimal number in the form of a sequence of decimal digits followed by a decimal point, followed by decimal digits, followed by an exponent indicated by \lstinline!E! or \lstinline!e! followed by a sign and one or more decimal digits.
The various parts can be omitted, see \lstinline[language=grammar]!UNSIGNED-REAL! in~\cref{lexical-conventions} for details and also the examples below.
The minimal recommended range is that of IEEE double precision floating point numbers, for which the largest representable positive number is $1.7976931348623157\times10^{308}$ and the smallest positive number is $2.2250738585072014\times 10^{-308}$.
For example, the following are floating point number literal constants:
\begin{lstlisting}[language=modelica]
22.5, 3.141592653589793, 1.2E-35
\end{lstlisting}
Expand Down

0 comments on commit 89f7426

Please sign in to comment.