Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/files/en-us/web/xpath/functions/round/index.md
6538 views
---
title: round slug: Web/XPath/Functions/round
---

{{ XsltRef() }}

The round function returns a number that is the nearest integer to the given number.

Syntax

round( decimal )

Arguments

  • decimal

    • : The decimal number to be rounded.

Returns

The nearest integer less then, greater than, or equal to decimal.

Notes

  • -0.5 rounds to negative zero. 0.4 rounds to positive zero.

Defined

XPath 1.0 4.4

Gecko support

Supported.