commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Benson (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JXPATH-102) Core rounding functions don't handle NaN or infinite values correctly
Date Mon, 27 Aug 2007 16:47:30 GMT

     [ https://issues.apache.org/jira/browse/JXPATH-102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Matt Benson updated JXPATH-102:
-------------------------------

    Summary: Core rounding functions don't handle NaN or infinite values correctly  (was:
Core rounding functions don't handle NaN correctly)

The XPath spec is explicit on rounding, but less so on ceiling/floor.  However, the spec claims
to use IEEE 754 which expresses ceiling/floor in terms of rounding, so I agree that abiding
by the same rules in all cases is reasonable.  Thanks for the report, Sergey!

> Core rounding functions don't handle NaN or infinite values correctly
> ---------------------------------------------------------------------
>
>                 Key: JXPATH-102
>                 URL: https://issues.apache.org/jira/browse/JXPATH-102
>             Project: Commons JXPath
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Sergey Vladimirov
>             Fix For: 1.3
>
>         Attachments: patch.txt, testcase-patch.txt
>
>
>         assertXPathValue(context, "floor('NaN')", new Double(Double.NaN));
>         assertXPathValue(context, "floor(-2 div 0)", new Double(Double.NEGATIVE_INFINITY));
>         assertXPathValue(context, "floor(2 div 0)", new Double(Double.POSITIVE_INFINITY));
>         assertXPathValue(context, "ceiling('NaN')", new Double(Double.NaN));
>         assertXPathValue(context, "ceiling(-2 div 0)", new Double(Double.NEGATIVE_INFINITY));
>         assertXPathValue(context, "ceiling(2 div 0)", new Double(Double.POSITIVE_INFINITY));
>         assertXPathValue(context, "round('NaN')", new Double(Double.NaN));
>         assertXPathValue(context, "round(-2 div 0)", new Double(Double.NEGATIVE_INFINITY));
>         assertXPathValue(context, "round(2 div 0)", new Double(Double.POSITIVE_INFINITY));

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message