Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#736 DecimalValue.isWholeNumber()

v9.0
closed
nobody
5
2012-10-08
2007-11-23
Michael Kay
No

The internal method DecimalValue.isWholeNumber() is designed to report true for any xs:decimal value that is numerically equal to an integer. However, it reports false for numbers that are an exact multiple of 10 (for example 10, 20, 300)

One easily observable consequence is that the expression

20.0 = (10 to 30)

return false.

Mostly, however, this method is used to invoke an optimization for cases where the value is a whole number, and the only adverse consequence is that the optimization is not invoked.

A patch is being placed in Subversion.

Discussion

  • Michael Kay
    Michael Kay
    2007-12-01

    Logged In: YES
    user_id=251681
    Originator: YES

    Fixed in 9.0.0.2

    (Note that the simple query given above does not actually trigger the bug).