Do not compare floating point numbers for equality
The problem is that there is no exact representation of 1 in floating-point format in either 0.3 or 0.9 , and therefore when multiplied by 0.3 * 3 you get a number very, very close to 0.9, and which will round to 0.9 for print, but it is not 0.9.
And your 0.9 constant is also not exactly 0.9, and these numbers are very slightly different.
.
1. 2 52 FP-, 1/2 n. 2.