Forum Discussion
Altera_Forum
Honored Contributor
16 years agoAlso if you declare constants and want to use single precision hardware use 'f' after the value otherwise the compiler will treat it as a double precision value (and the hardware will not be used).
i.e. instead of a = 0.0 use a = 0.0f instead. Otherwise you would get this behavior even with a hardware single precision multiplier: y = 2.0 * 3.0; // compiler will treat this a double precision and not use hardware y = 2.0f * 3.0f; // compiler will use single precision hardware