XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition (528 page)

BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
5.93Mb size Format: txt, pdf, ePub

If the argument value is an
xs:double
or
xs:float
greater than -1.0 but less than zero it will be rounded up to negative zero. For most practical purposes, negative zero and positive zero are indistinguishable, but dividing a number by negative zero produces negative infinity, while dividing by positive zero produces positive infinity.

Examples

Expression
Result
ceiling(1.0)
xs:decimal 1.0, displayed as
1
ceiling(1.6)
xs:decimal 2.0, displayed as
2
ceiling(17 div 3)
xs:decimal 6.0, displayed as
6
ceiling(-3.0)
xs:decimal −3.0, displayed as
-3
ceiling(-8.2e0)
xs:double −8.0e0, displayed as
-8
ceiling(number(‘xxx’))
xs:double NaN, displayed as
NaN
ceiling(-0.5e0)
xs:double −0.0e0, displayed as
-0

Other books

06 Fatal Mistake by Marie Force
The Favor by Nicholas Guild
The Murdock's Law by Loren D. Estleman
Rules of the Game by Neil Strauss
Rawhide and Roses by James, Maddie
The Outlander by Gil Adamson
Chance of a Lifetime by Grace Livingston Hill
Silver Sparks by Starr Ambrose
Bitter Nothings by Vicki Tyley