xsl-list
[Top] [All Lists]

Re: [xsl] ceiling(), floor(), and data types

2017-09-14 09:37:15

Fully supporting xs:integer or xs:decimal would need for implementers to support arithmetics with infinite precision while, usually, programming language just allow int, long,..., float, double (even just double for _javascript_, actually, while COBOL is smarter!).

Then, specifically for ceiling() or floor(), if the parameter is a huge double with precision > 10, those cannot return better than the parameter itself as a double, don't you think?

Alain Couthures
agenceXML

Le 14 septembre 2017 à 12:30, "Birnbaum, David J djbpitt(_at_)pitt(_dot_)edu" <xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> a écrit :

Dear XSL List,

I was surprised to learn today that ceiling() and floor() do not obligatorily return a value of type xs:integer. If I've understood correctly that they necessarily return a value that a human would consider an integer, is there a reason that other return types are permitted?

Thanks,

David
<Prev in Thread] Current Thread [Next in Thread>