The relation is often stated as $E = h\nu$
Simple enough. But the frequency $\nu$ doesn't have to be a natural number or even an integer, correct? It can be any rational number or even any real number. So why is the energy $E$ quantized anyway? And if the given equation is technically faulty then how should it be written?