The decimal data type in Appian seems very limited, e.g. todecimal(100000.99) returns 100001
Any ideas?
https://docs.appian.com/suite/help/18.2/fnc_conversion_todecimal.html
Discussion posts and replies are publicly visible
Hi normanc , Can you please check in Expression rule editor. I think it behaves as expected in rule editor.
Wow... I am able to replicate this behavior in the Expression rule editor. I also tested it by setting a rule input to decimal type, showing it in a text field, and experimenting with how many sig figs I could put before it started rounding the value. It is very surprising. It seems as if the Decimal data type can only contain a maximum of 7 decimal digits. This is usually the precision of a single precision floating point. Most implementations of a double precision floating point have 16 decimal digits. I will ask around and put in a question to support. If I find any additional information I'll post it here.
It looks like fixed() isn't super accurate. Am I doing something wrong?
text( 266879.39999999997 / 60, "#.####")
outputs: "4447.9899"
whereas,
fixed( 266879.39999999997 / 60, 4, true)
outputs: "4447.9900"