round-half-to-even


round-half-to-even

The round-half-to-even() function performs rounding to a specified number of decimal places. The rounding algorithm used is to round to the nearest value that has the required precision, choosing an even value if two values are equally close. For example, «round-half-to-even(0.035, 2) » returns 0.04 , while «round-half-to-even(4500, -3) » returns 4000 .

Argument

Data Type

Meaning

input

Numeric?

The number to be rounded

precision (optional)

xs:integer

If positive, the number of significant digits required after the decimal point. If negative, the number of zeroes required at the end of the integer part of the result

Result

Numeric ?

The rounded number. This will have the same data type as the supplied number




XSLT 2.0 Programmer's Reference
NetBeansв„ў IDE Field Guide: Developing Desktop, Web, Enterprise, and Mobile Applications (2nd Edition)
ISBN: 764569090
EAN: 2147483647
Year: 2003
Pages: 324

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net