PBP uses full precedence of math operators, and also uses braces to force out of order of calculation.First - theBase # is "223" This is the value in #Dec_temp
Then look at the math:
Testmath1 - (Dec_temp*(9/5)+32) = 255 -- this is wrong
Secondly it also only works in integers.
As such (9/5) = 1.8 = 1 ( and is calculated first )
hence Dec_tempf = 223 * 1 +32 = 255
try ( Dec_temp*( 90 / 5 ) + 320 ) / 10
ie ( Dec_temp*18 + 320 ) / 10
Also, if you just leave it at ( Dec_temp*18 + 320 ) you can use simple math to get the basic temp and the first decimal.
Andrew
Bookmarks