Commit 0acada74 authored by Julius Volz's avatar Julius Volz

Merge pull request #54 from fabxc/fabxc/logexp

Add documentation for exp, ln, log2, and log10 functions.
parents b9d86c73 40053901
...@@ -81,6 +81,14 @@ cpu_temp_celsius{host="zeus"} + deriv(cpu_temp_celsius{host="zeus"}[1h]) * 5 * 6 ...@@ -81,6 +81,14 @@ cpu_temp_celsius{host="zeus"} + deriv(cpu_temp_celsius{host="zeus"}[1h]) * 5 * 6
`drop_common_labels(instant-vector)` drops all labels that have the same name `drop_common_labels(instant-vector)` drops all labels that have the same name
and value across all series in the input vector. and value across all series in the input vector.
## `exp()`
`exp(v instant-vector)` calculates the exponential function for all elements in `v`.
Special cases are:
* `Exp(+Inf) = +Inf`
* `Exp(NaN) = NaN`
## `floor()` ## `floor()`
`floor(v instant-vector)` rounds the sample values of all elements in `v` down `floor(v instant-vector)` rounds the sample values of all elements in `v` down
...@@ -134,6 +142,26 @@ for quantiles located in the lowest bucket. ...@@ -134,6 +142,26 @@ for quantiles located in the lowest bucket.
If `b` contains fewer than two buckets, `NaN` is returned. For φ < 0, `-Inf` is If `b` contains fewer than two buckets, `NaN` is returned. For φ < 0, `-Inf` is
returned. For φ > 1, `+Inf` is returned. returned. For φ > 1, `+Inf` is returned.
## `ln()`
`ln(v instant-vector)` calculates the natural logarithm for all elements in `v`.
Special cases are:
* `ln(+Inf) = +Inf`
* `ln(0) = -Inf`
* `ln(x < 0) = NaN`
* `ln(NaN) = NaN`
## `log2()`
`log2(v instant-vector)` calculates the binary logarithm for all elements in `v`.
The special cases are equivalent to those in `ln`.
## `log10()`
`log10(v instant-vector)` calculates the decimal logarithm for all elements in `v`.
The special cases are equivalent to those in `ln`.
## `rate()` ## `rate()`
`rate(v range-vector)` calculate the per-second average rate of increase of the `rate(v range-vector)` calculate the per-second average rate of increase of the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment