| ??? 01/11/05 12:46 Read: times |
#84742 - division problem in keil evaluation? Responding to: ???'s previous message |
when i do the following:
dist = time / 58300; where time is an unsigned long of value (33161728 dec) so the correct answer is 568.811. However, because the evaluation version does not allow floating point numbers i have assigned dist as an unsigned int. I only want the real part. then i use: printf("dist %X dist %un ", dist, dist); the output is giving me: dist C00 dist 0 HOWEVER, in the main code when i move the cursor over dist it is showing a value of: dist = 0x0238 = 568 decimal which is what i want. Why isnt it printing this to the screen?? |
| Topic | Author | Date |
| Multiplication Problems and data types | 01/01/70 00:00 | |
| use unsigned int for totcount | 01/01/70 00:00 | |
| Wrong printf format specifier? | 01/01/70 00:00 | |
| yes i am using printf | 01/01/70 00:00 | |
| manual! | 01/01/70 00:00 | |
| using %d and %x | 01/01/70 00:00 | |
| %u | 01/01/70 00:00 | |
| Exactly what it says on the tin! | 01/01/70 00:00 | |
| Division problem? | 01/01/70 00:00 | |
| division problem in keil evaluation? | 01/01/70 00:00 | |
| Which Part? | 01/01/70 00:00 | |
| its ok i have sorted it! | 01/01/70 00:00 | |
| Still a problem, then... | 01/01/70 00:00 | |
| not so strange | 01/01/70 00:00 | |
| Not so strange? | 01/01/70 00:00 | |
| Need complete code! | 01/01/70 00:00 | |
| Like this | 01/01/70 00:00 | |
| code | 01/01/70 00:00 | |
| Calling printf from an ISR | 01/01/70 00:00 | |
| other interrupts wont get in the way | 01/01/70 00:00 | |
| ISR | 01/01/70 00:00 | |
| yes i see what you mean | 01/01/70 00:00 | |
No No Inside ISR | 01/01/70 00:00 |



