in my program i should calculate this formula:
temperature=(temp*0.648)-(temp*temp*7.2e-4)-4
temp is an 8 bit number that can change from 0 to 255.(the output of the sensor)
for example i should do this:
temp*temp*72/100000
but 100000 is greater than a word and if i want to break it to 1000 and 100 like this:
(temp*temp*72/1000)/100 it won't give the correct answer
because every diviation"/" has a remian and also (temp*temp*72) is gerater than a word.
what should i do?
could you help me with this problem?
i use micro code studio picbasic pro2.41
temperature=(temp*0.648)-(temp*temp*7.2e-4)-4
temp is an 8 bit number that can change from 0 to 255.(the output of the sensor)
for example i should do this:
temp*temp*72/100000
but 100000 is greater than a word and if i want to break it to 1000 and 100 like this:
(temp*temp*72/1000)/100 it won't give the correct answer
because every diviation"/" has a remian and also (temp*temp*72) is gerater than a word.
what should i do?
could you help me with this problem?
i use micro code studio picbasic pro2.41