You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Steve Lawrence (JIRA)" <ji...@apache.org> on 2019/02/25 15:28:00 UTC
[jira] [Created] (DAFFODIL-2076) fn:ceiling does not work on
xs:decimal
Steve Lawrence created DAFFODIL-2076:
----------------------------------------
Summary: fn:ceiling does not work on xs:decimal
Key: DAFFODIL-2076
URL: https://issues.apache.org/jira/browse/DAFFODIL-2076
Project: Daffodil
Issue Type: Bug
Components: Back End
Affects Versions: 2.3.0
Reporter: Steve Lawrence
Fix For: 2.4.0
The fn:ceiling function (and likely other related functions that do rounding-like operations) does not correctly work on xs:decimal's. For example:
{code}
fn:ceiling(xs:decimal(0.125))
{code}
results in 0.125. The expected value is 1.
Floats and doubles do round correctly, so a temporary work around is to cast any decimals that are passed into fn:ceiling to xs:doubles.
Note that commit a20ff4172807f5e0264ce68142f15f9798df1e8b changed the behavior of {{div}} to always return an xs:decimal instead of an xs:float/double, so any functions that try to fn:ceiling a division will likely run into this issue and require the xs:double cast as a workaround.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)