number formats in mathematic expressions


this may dumb question despite searching have yet find answer.

i have code processing results number of sensor , computing single number result. sensor number formats either float or int.  sensor inputs should changing time , believe behaving time time result changes radically , i'm trying track down.
one possibility maybe due number formats
the key equation in terms of formats follows

float = float + ((float-float)*int)/(float-float) cause problems?

put way, precision lost in above due int variable , should make them floating point?

tia

bob

quote
is cause problems?

maybe. depends on last 2 float values. if every equal, out.

quote
is precision lost in above due int variable

dividing float int promote int float, don't need worry it.


Arduino Forum > Using Arduino > Programming Questions > number formats in mathematic expressions


arduino

Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support