i'm trying to display result of a simple math calcultation on 5-digit 7-segment display.
my display code is absouletly correct. but problem is in math equation.
I'm using 89c52 controller and doing coding in Keil C51.
here's the part of code which isn't working properly:
If that is your actual code (which I suspect it isn't) then
result=1680;
will work.
I suspect that you have variables involved and this is a result of rounding errors caused by using floating point. With more information it may be possible to advise something like,
My computer dealer told me that after the 486 Intel called their next chip Pentium because when they tried to call it 586, they kept getting 585.9999999999