wowgetoffyourcellphone Posted September 24, 2019 Report Share Posted September 24, 2019 Post them when ya got em. This seems to be a recurring issue with the development of the game where rounding errors always seem to crop up. lol Quote Link to comment Share on other sites More sharing options...
smiley Posted September 24, 2019 Report Share Posted September 24, 2019 Better than when spear cavalry does not get promoted due to a lack of 0.000000003 xp (not sure if I got the numbers of 0s correctly). 1 Quote Link to comment Share on other sites More sharing options...
Nescio Posted September 24, 2019 Report Share Posted September 24, 2019 1 hour ago, wowgetoffyourcellphone said: Post them when ya got em. This seems to be a recurring issue with the development of the game where rounding errors always seem to crop up. lol Interestingly, this is not present in A23; there trade gain is displayed as an integer. I don't now when or what introduced those decimals in A24. Quote Link to comment Share on other sites More sharing options...
happyconcepts Posted September 25, 2019 Report Share Posted September 25, 2019 JavaScript has its own, shall we say, interpretation .... of int and float. I would check any maths added to trade.js? Quote Link to comment Share on other sites More sharing options...
smiley Posted September 25, 2019 Report Share Posted September 25, 2019 (edited) If I might suggest something, you might wanna look into that commit which added the manager thing. In this case, this is just a missed rounding as opposed to an actual error. *just to clarify, I am not saying that its what caused the problem. Just saying that its a possibility. I dont care enough to go through commit logs lol. Spoiler [stuff nobody asked for] Unfortunately, floating point errors are not specific to JS. Using double precision, 0.1 + 0.2 = 0.30000000000000004. Python, JS, C++, whatever. 1/5 = 0.2 in base 10. In base 2, its 0.00110011001100110011001100110011001100110011001100110011... and it goes on infinitely. In the IEEE 752 standard, the significand is 53 bits, the rest is cut off. Same as when you cant get exactly 1 when you add 1/3 + 1/3 + 1/3 together in a calculator which does not round off. [/stuff nobody asked for] Edited September 25, 2019 by smiley 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted September 25, 2019 Report Share Posted September 25, 2019 Thanks @smiley. Quote Link to comment Share on other sites More sharing options...
Stan` Posted September 25, 2019 Report Share Posted September 25, 2019 Will be fixed by https://code.wildfiregames.com/D2327 Introduced by https://code.wildfiregames.com/rP22964 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.