Number conversion

Bugs will be moved here once resolved.

Post » Thu Jun 05, 2014 9:47 am

Number conversion
I am getting decimals where there shouldnt be any. If i input a value of 500000000000000 to an Array, i get 500000000000000.06 back from it when displaying the array post in a textbox.

Attach a Capx
See attachment

Description of Capx
____ Concise description of what this CapX does ____

Steps to Reproduce Bug
  • Step 1
  • Step 2
  • Step 3 etc.

Observed Result
Image

Expected Result
If i input a value of 500000000000000 to an Array i expext the output to be the same.

Affected Browsers
  • Chrome: (YES/NO)
    [ ] FireFox: (YES/NO) (Not tested)
    [ ] Internet Explorer: (YES/NO) (Not tested)

Operating System and Service Pack
------------------
System Information
------------------
Time of this report: 6/5/2014, 11:37:55
Machine name: FROSTYELK
Operating System: Windows 8.1 64-bit (6.3, Build 9600) (9600.winblue_gdr.140305-1710)
Language: Swedish (Regional Setting: Swedish)
System Manufacturer: ASUSTeK COMPUTER INC.
Processor: Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz (8 CPUs), ~2.4GHz
Memory: 16384MB RAM
Available OS Memory: 16334MB RAM
Page File: 4190MB used, 28527MB available
Windows Dir: C:\WINDOWS
DirectX Version: DirectX 11
System DPI Setting: 96 DPI (100 percent)
---------------
Display Devices
---------------
Card name: NVIDIA GeForce GTX 780M
Manufacturer: NVIDIA
Display Memory: 12162 MB
Dedicated Memory: 3995 MB
Shared Memory: 8166 MB
Current Mode: 1920 x 1080 (32 bit) (60Hz)

Construct 2 Version ID
Release 170 (64bit) Business License


Best regards!
/Rickard Drakborn
CEO, Frosty Elk AB
http://www.frostyelk.se
[email protected]
You do not have the required permissions to view the files attached to this post.
Frosty Elk AB
www.frostyelk.se
Have no fear, We come in peace!
B
13
S
3
G
1
Posts: 106
Reputation: 1,169

Post » Thu Jun 05, 2014 2:21 pm

Closing, computers do not have infinite precision for numbers. See the section 'Expecting math calculations to be correct' in https://www.scirra.com/blog/141/common-mis-used-events-and-gotchas.
Scirra Founder
B
400
S
237
G
89
Posts: 24,550
Reputation: 195,527


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests