From 9290d1308dfe5286e8e67cff45460662d6b6b6dc Mon Sep 17 00:00:00 2001 From: Rick Rackow Date: Fri, 28 Jun 2024 22:18:04 +0200 Subject: [PATCH] fix(docs/querying): explain `ceil` behaviour more explicitly with examples (#11987) * fix(docs/querying): explain `ceil` behaviour more explicitly with examples Signed-off-by: Rick Rackow * fix(docs/querying): explain `floor` behaviour more explicitly with examples Signed-off-by: Rick Rackow --------- Signed-off-by: Rick Rackow Signed-off-by: Rick Rackow Co-authored-by: Rick Rackow --- docs/querying/functions.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/querying/functions.md b/docs/querying/functions.md index c8fda28655..9a552f697a 100644 --- a/docs/querying/functions.md +++ b/docs/querying/functions.md @@ -79,7 +79,12 @@ labels of the 1-element output vector from the input vector. ## `ceil()` `ceil(v instant-vector)` rounds the sample values of all elements in `v` up to -the nearest integer. +the nearest integer value greater than or equal to v. + +* `ceil(+Inf) = +Inf` +* `ceil(±0) = ±0` +* `ceil(1.49) = 2.0` +* `ceil(1.78) = 2.0` ## `changes()` @@ -173,7 +178,12 @@ Special cases are: ## `floor()` `floor(v instant-vector)` rounds the sample values of all elements in `v` down -to the nearest integer. +to the nearest integer value smaller than or equal to v. + +* `floor(+Inf) = +Inf` +* `floor(±0) = ±0` +* `floor(1.49) = 1.0` +* `floor(1.78) = 1.0` ## `histogram_avg()`