If I do : trunc(todecimal("4.71"),2)&"---"&rounddown(todecimal("4.71"),2)
I correctly get : 4.71---4.71
But If I do: trunc(todecimal("4.81"),2) &"---"&rounddown(todecimal("4.81"),2)
I get : 4.8---4.81
Why does it give me 4.8 for trunc(todecimal("4.81"),2) = 4.8?
Discussion posts and replies are publicly visible
The problem isn't necessarily product(Appian) specific. This issue can actually be reproduced in other programming languages, and is a side-effect of the way decimal numbers are stored and operated on.
Only fixed can resolve this problem. Use fixed(4.81,2). This should resolve the issue.