Status/Resolution/Reason: To Fix//
Reporter/Name(from Bugbase): Beau Gibson / Beau Gibson (Beau Gibson)
Created: 09/21/2016
Components: Language, Functions
Versions: 2016
Failure Type:
Found In Build/Fixed In Build: CF2016_Final /
Priority/Frequency: Major / Some users will encounter
Locale/System: ALL / Platforms All
Vote Count: 0
Problem Description:
The eq operator is not working as expected when comparing certain values.
Seems like this is could be a rounding error
Steps to Reproduce:
<cfset val1 = 14030 />
<cfset val2 = 140.30 * 100 />
#val1# eq #val2#? #val1 eq val2#
Actual Result:
14030 eq 14030? NO
Expected Result:
14030 eq 14030? YES
Any Workarounds:
Wrapping the (140.30 * 100) in a VAL() makes it work as expected.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4191694
External Customer Info:
External Company:
External Customer Name: Beau Gibson
External Customer Email:
External Test Config: My Hardware and Environment details:
Coldfusion 9 on windows Server 2008
Coldfusion 2016 on Microsoft Windows 10
Occurs on every version using www.trycf.com/scratch-pad
Attachments:
Comments: