Changes

416 bytes added ,  04:07, 11 April 2021
talk answer and header
Line 1: Line 1:  +
{{Talkheader}}
 
I am trying to calculate the impact of Speed-Gro on the days to maturity. The formula I am using is the greater of [Days to Maturiity]-RoundUp([Days to Maturity]*10%). This works for Deluxe Speed-Gro and Hyper Speed-Gro, but when I compare the basic speed-gro calc to the chart on the green bean page I calculate 9 days as opposed to the 8 days the chart says it should take. What am missing in the calculation?
 
I am trying to calculate the impact of Speed-Gro on the days to maturity. The formula I am using is the greater of [Days to Maturiity]-RoundUp([Days to Maturity]*10%). This works for Deluxe Speed-Gro and Hyper Speed-Gro, but when I compare the basic speed-gro calc to the chart on the green bean page I calculate 9 days as opposed to the 8 days the chart says it should take. What am missing in the calculation?
 +
:A mixture of imprecision and rounding. decimal number 0.1 is not representable in binary floating-point, so 0.1 x 10 is not actually 1 but 1.00000001490116119384765625 decimal. the game then rounds this up to 2, because it's technically "bigger than 1". for more details look up floating-point arithmetic on wikipedia. [[User:Dubesor|Dubesor]] ([[User talk:Dubesor|talk]]) 04:06, 11 April 2021 (UTC)
2,280

edits