ceil.asciidoc 729 B

1234567891011121314151617181920212223242526272829303132333435
  1. [discrete]
  2. [[esql-ceil]]
  3. === `CEIL`
  4. *Syntax*
  5. [.text-center]
  6. image::esql/functions/signature/ceil.svg[Embedded,opts=inline]
  7. *Parameters*
  8. `n`::
  9. Numeric expression. If `null`, the function returns `null`.
  10. *Description*
  11. Round a number up to the nearest integer.
  12. NOTE: This is a noop for `long` (including unsigned) and `integer`.
  13. For `double` this picks the closest `double` value to the integer
  14. similar to {javadoc}/java.base/java/lang/Math.html#ceil(double)[Math.ceil].
  15. include::types/ceil.asciidoc[]
  16. *Example*
  17. [source.merge.styled,esql]
  18. ----
  19. include::{esql-specs}/math.csv-spec[tag=ceil]
  20. ----
  21. [%header.monospaced.styled,format=dsv,separator=|]
  22. |===
  23. include::{esql-specs}/math.csv-spec[tag=ceil-result]
  24. |===