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
7 replies
Subscribers
7 subscribers
Views
2479 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
I think there may be a bug with the "<" operator and decimal operan
mpontius
over 8 years ago
I think there may be a bug with the "<" operator and decimal operands. More specifically with the decimal operand with a .0 decimal place. It is reproduce-able with the following test expression. I would expect this to return an array of all true values, but instead for the first two it returns false. This only seems to be a problem with -1 and 1.0 for some reason. I have not been able to reproduce with other numbers.
{
-1.0 < 1.0,
-1 < 1.0,
-1 < 1,
-1 < 1.01,
-1 = -1.0,
-1.0 <= 1.0,
-1 <= 1.0,
1.0 > -1,
1 > -1.0
}
OriginalPostID-156893
OriginalPostID-156893
Discussion posts and replies are publicly visible
0
mpontius
over 8 years ago
I lied, I can reproduce it with -2 < 2.0. I think any time the numbers are the same and a number with a .0 decimal place is used this evaluation does not work.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
JANARDHNA KETHA
over 8 years ago
Yes, it is an issue. But as a workaround if we use greater than for those tow cases then it is working fine. 1.0 > -1.0 , 1.0> -1 ,
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
Certified Lead Developer
over 8 years ago
I was going to say it could be a type issue but -2.0 < 2.0 returns false...?!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mpontius
over 8 years ago
Yeah there is definitely a bug, janardhnak I agree that it can be worked around, but for something so simple that is a pain.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Ramy Jaber
Appian Employee
over 8 years ago
What version and HotFix is this happening on?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Paul Mayeur
Appian Employee
over 8 years ago
AN-61990 has been created to track this issue
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Matt Hilliard
Appian Employee
over 8 years ago
Thanks for reporting this. A fix for this issue will be included in the next hotfix package for all supported versions (7.4 and above).
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel