Comparison bug

Report Construct 2 bugs here.

Post » Fri Mar 17, 2017 9:09 pm

Problem Description
A greater than var condition, with a value less than 1 in the decimal range, is still triggering once when the condition becomes false.

Attach a Capx
https://www.dropbox.com/s/ppb57vmnk7c5q ... .capx?dl=0

Description of Capx
Two values shown with two keyboard conditions. One controls val with less than 1 and another controls varTwo with greater than 1.

Steps to Reproduce Bug
  • Press S until the text on the right becomes true as shown on the header above it.
  • Press A until the value on the left becomes less than the value shown above it.

Observed Result
The value on the left triggers one more time past the stated condition shown above.

Expected Result
The value on the left stops at the condition shown above.

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • Internet Explorer: (YES)

Operating System and Service Pack
Windows 10, 64bit

Construct 2 Version ID
r243
B
16
Posts: 10
Reputation: 524

Post » Sat Mar 18, 2017 8:23 pm

Not a bug in the comparison.

val = 0.40000000000000013, or bigger then 0.4, so the comparison is just true.

It is a accuracy trade off that goes with software and computers.

https://www.google.be/search?q=floating ... arithmetic

It is for you to make 'software' that is using algorithms that goes along with this.
B
23
S
14
G
22
Posts: 1,886
Reputation: 16,088

Post » Sun Mar 19, 2017 12:19 am

99Instances2Go wrote:Not a bug in the comparison.

val = 0.40000000000000013, or bigger then 0.4, so the comparison is just true.

It is a accuracy trade off that goes with software and computers.

https://www.google.be/search?q=floating ... arithmetic

It is for you to make 'software' that is using algorithms that goes along with this.



Ah okay, thanks for the explanation. 8)
B
16
Posts: 10
Reputation: 524


Return to Bugs

Who is online

Users browsing this forum: No registered users and 0 guests