How to use round operation in Number Function Using XPath in Xml

In this article I will explain round operation of number function.
  • 1873

Introduction

The round operation in number function can be used to returns an integer closest in value to the argument.Their are some cases in round function :

If the argument is NaN, then NaN is returned.
If the argument is positive infinity, positive infinity is returned.
If the argument is negative infinity, negative infinity is returned.
If the argument is positive zero, positive zero is returned.
If the argument is negative zero, negative zero is returned.
If the argument is less than zero but greater than or equal to -0.5, negative zero is returned.

Syntax

number round (number)

Example

round(3.5)
round(-5.2)
round(3.8)
round(123.8)

Output

4
-5
4
124

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.