NATION

PASSWORD

Issues with Math for Issues

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
Blitze
Lobbyist
 
Posts: 12
Founded: May 09, 2015
Ex-Nation

Issues with Math for Issues

Postby Blitze » Fri May 20, 2016 2:22 pm

Alright, I am going to apologize if this has been brought up before, as I am sure it has, however there is a slight problem with math when one completes an issue. One can go into negative numbers on something, such as freedom from taxation (I am -185 before an issue). However, when it increases by 1.3%, it says my freedom from taxation goes down to say -184, which would be incorrect math. A negative number that has an increased percentage will increase the negative number not go down. So I don't know if this is purposely like this, or if should be fixed, and I am sorry if this has been pointed out before, thank you for taking the time to read.

User avatar
Haydia
Lobbyist
 
Posts: 15
Founded: Nov 01, 2013
Ex-Nation

Postby Haydia » Fri May 20, 2016 3:32 pm

-184 is greater than -185.

User avatar
Trotterdam
Postmaster-General
 
Posts: 10208
Founded: Jan 12, 2012
Left-Leaning College State

Postby Trotterdam » Fri May 20, 2016 3:39 pm

I am pretty sure that the displayed percentages are percentages of the absolute value of the previous stat. So -185 "plus" 1.3% would be -182.595. This is to ensure that positive percentages always signify increases and negative percentages always signify decreases, since quite often you'll be more interested in the direction of the change than the exact value.

This is pretty clearly deliberate. Coding the calculation to use absolute values would take more effort than using the "obvious" math, and so is unlikely to have been done by accident.

I'm not sure how the game handles it when a value that was previously exactly zero stops being zero. (Mathematically speaking, that's an increase/decrease of infinity percent.) I think the game describes it as rising/falling by exactly 100%, I recall seeing that once.

User avatar
Blitze
Lobbyist
 
Posts: 12
Founded: May 09, 2015
Ex-Nation

Postby Blitze » Fri May 20, 2016 4:20 pm

Haydia wrote:-184 is greater than -185.

Sorry, I meant went up to -184, but the percentage thing holds true.

User avatar
Blitze
Lobbyist
 
Posts: 12
Founded: May 09, 2015
Ex-Nation

Postby Blitze » Fri May 20, 2016 4:20 pm

Trotterdam wrote:I am pretty sure that the displayed percentages are percentages of the absolute value of the previous stat. So -185 "plus" 1.3% would be -182.595. This is to ensure that positive percentages always signify increases and negative percentages always signify decreases, since quite often you'll be more interested in the direction of the change than the exact value.

This is pretty clearly deliberate. Coding the calculation to use absolute values would take more effort than using the "obvious" math, and so is unlikely to have been done by accident.

I'm not sure how the game handles it when a value that was previously exactly zero stops being zero. (Mathematically speaking, that's an increase/decrease of infinity percent.) I think the game describes it as rising/falling by exactly 100%, I recall seeing that once.


And fair enough. Just making sure.


Return to Technical

Who is online

Users browsing this forum: No registered users

Advertisement

Remove ads