Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation should specify what scientific notation on hexadecimal numbers means #13280

Closed
JasonGross opened this issue Oct 29, 2020 · 2 comments · Fixed by #15021
Closed
Labels
good first issue Beginners welcome to submit a pull request. kind: documentation Additions or improvement to documentation.
Milestone

Comments

@JasonGross
Copy link
Member

Description of the problem

In

Numbers
Numbers are sequences of digits with an optional fractional part
and exponent, optionally preceded by a minus sign. Hexadecimal numerals
start with ``0x`` or ``0X``. :n:`@bigint` are integers;
numbers without fractional nor exponent parts. :n:`@bignat` are non-negative
integers. Underscores embedded in the digits are ignored, for example
``1_000_000`` is the same as ``1000000``.
.. insertprodn number hexdigit
.. prodn::
number ::= {? - } @decnat {? . {+ {| @digit | _ } } } {? {| e | E } {? {| + | - } } @decnat }
| {? - } @hexnat {? . {+ {| @hexdigit | _ } } } {? {| p | P } {? {| + | - } } @decnat }
integer ::= {? - } @natural
natural ::= @bignat
bigint ::= {? - } @bignat
bignat ::= {| @decnat | @hexnat }
decnat ::= @digit {* {| @digit | _ } }
digit ::= 0 .. 9
hexnat ::= {| 0x | 0X } @hexdigit {* {| @hexdigit | _ } }
hexdigit ::= {| 0 .. 9 | a .. f | A .. F }

There is no description of the semantics of e/E nor p/P. I know from common usage that e/E means *10^, and apparently (from experimentation) p means *2^. Both of these should be documented.

cc @proux01

Coq Version

master

@JasonGross JasonGross added the kind: documentation Additions or improvement to documentation. label Oct 29, 2020
@Zimmi48 Zimmi48 added this to Writing in User documentation Oct 29, 2020
@JasonGross JasonGross added the good first issue Beginners welcome to submit a pull request. label Nov 23, 2020
@JasonGross
Copy link
Member Author

@G-Sheridan yes, that seems reasonable, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Beginners welcome to submit a pull request. kind: documentation Additions or improvement to documentation.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants
@JasonGross @Zimmi48 and others