[
https://issues.apache.org/jira/browse/DAFFODIL-2076?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Josh Adams resolved DAFFODIL-2076.
----------------------------------
Resolution: Fixed
Assignee: Dave Thompson (was: Josh Adams)
This has been resolved in commit 4caaeff7b9df8432d482e7bf664b134921ce2293
> 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
> Assignee: Dave Thompson
> Priority: Blocker
> 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)