[linux-dvb] slightly OT: Floats at compile time

Patrick Boettcher patrick.boettcher at desy.de
Fri Jan 13 09:55:03 CET 2006


Hi,

I know this will be slightly off-topic, but at least it is related to 
linux-dvb as linux-dvb drivers will be the result:

For our demodulators some reception-sensitive values are different for 
each application (devices/systems). Clever heads are calculating those 
values while doing exhaustive tests. By default those values are 
non-decimal. As we all know, float calculations are not allowed at kernel 
level, that's why the values are rounded all the time before making it 
into the driver.

My question is: Is it save to assume, that all compilers calculate the 
following assignment at compile time?

int value = 0.523 * 65535;

Presuming it is true, would kernel guys accept such a thing: using 
floats for compile time constants?

Thanks in advance for any advice,
Patrick.

--
   Mail: patrick.boettcher at desy.de
   WWW:  http://www.wi-bw.tfh-wildau.de/~pboettch/



More information about the linux-dvb mailing list