mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-21 03:16:00 -08:00
Improve scalar literal format documentation (#7651)
* Improve scalar literal format documentation Signed-off-by: Julius Volz <julius.volz@gmail.com> * Address review comments Signed-off-by: Julius Volz <julius.volz@gmail.com> * Fixup Signed-off-by: Julius Volz <julius.volz@gmail.com>
This commit is contained in:
parent
22acb87e09
commit
9da59c856d
|
@ -55,10 +55,23 @@ Example:
|
||||||
|
|
||||||
### Float literals
|
### Float literals
|
||||||
|
|
||||||
Scalar float values can be literally written as numbers of the form
|
Scalar float values can be written as literal integer or floating-point numbers in the format (whitespace only included for better readability):
|
||||||
`[-](digits)[.(digits)]`.
|
|
||||||
|
|
||||||
|
[-+]?(
|
||||||
|
[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?
|
||||||
|
| 0[xX][0-9a-fA-F]+
|
||||||
|
| [nN][aA][nN]
|
||||||
|
| [iI][nN][fF]
|
||||||
|
)
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
23
|
||||||
-2.43
|
-2.43
|
||||||
|
3.4e-9
|
||||||
|
0x8f
|
||||||
|
-Inf
|
||||||
|
NaN
|
||||||
|
|
||||||
## Time series Selectors
|
## Time series Selectors
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue