Closed nixonjoshua98 closed 3 years ago
Number goes to Infinity after stage 5144. What am I doing wrong?
public static BigDouble CalcEnemyHealth(int stage) { BigDouble x = BigDouble.Pow(1.35, Mathf.Min(stage - 1, 65)); BigDouble y = BigDouble.Pow(1.15, Mathf.Max(stage - 65, 0)); Debug.Log(y.ToString("E3")); return BigDouble.Multiply(15, BigDouble.Multiply(x, y)); }
Stage 5143 will display 1.674E+308 here but stage 5144 will display NaNE+0. The returned value will show Infinity at stage 5144.
1.674E+308
NaNE+0
Number goes to Infinity after stage 5144. What am I doing wrong?
Stage 5143 will display
1.674E+308
here but stage 5144 will displayNaNE+0
. The returned value will show Infinity at stage 5144.