??? 08/06/07 00:58 Read: times |
#142791 - what's the different Responding to: ???'s previous message |
By replacing 12000000 with 12000000.0 the program worked properly. That would force the compiler to use float throughout the calculation right?
Another question. How does the above argument different from the following one: const float temp1 = 22118400.0 / 12000000; tmp = 65536 - (10 * AxisAngle + 460) * temp1; Which one actually did the calculation for "temp1"? The compiler or the AT89S52? And I notice that the argument above won't work without the float constant. So what does the "float" in "const float" do? Stanley |