Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
3 replies
Subscribers
7 subscribers
Views
1285 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Hello Everyone, I'm seeing some inconsistent behavior when tryi
Jin Pheh
Certified Associate Developer
over 8 years ago
Hello Everyone,
I'm seeing some inconsistent behavior when trying to round number. In 7.9 I get the following results:
round(3.6666, 2): 3.67
round(3.6666, 3): 3.6670000000000003
round(3.6666, 4): 3.6666000000000003
round(3.6666, 5): 3.6666000000000003
round(3.6666, 6): 3.6666
round(3.6666, 7): 3.6666
etc.
Can anyone shed some light on what may be going on here?
OriginalPostID-170213
OriginalPostID-170213
Discussion posts and replies are publicly visible
0
Jin Pheh
Certified Associate Developer
over 8 years ago
Note that this behavior only manifests when used as the value in a floatingPointField. When displaying the results in a textField() the round function works as expected.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 8 years ago
I've seen this issue before and had to work around it; I suggest you raise a ticket with support.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Shyam Bommakanti
Certified Lead Developer
over 8 years ago
@jpheh Use fixed(number, decimals, no_commas) instead of round.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel