??? 03/14/12 20:38 Read: times |
#186669 - negative float numbers Responding to: ???'s previous message |
I have a calculation where the result can vary from -255 to + 255
My mistake. The result is first between -20 to +20 (which is actually an angle in degrees). float is needed because of the multiplication to achieve the angle. The problem is that the 8051 doesn't actually recognise the negative float numbers when making an if statement like below: if(value<0) { action1 } if(value>= 0) { action2 } |
Topic | Author | Date |
I'm having problems calculating negative float values | 01/01/70 00:00 | |
float values? | 01/01/70 00:00 | |
65536 no | 01/01/70 00:00 | |
negative float numbers | 01/01/70 00:00 | |
Two comparisons | 01/01/70 00:00 | |
Insufficient justification | 01/01/70 00:00 | |
re:insufficient justification | 01/01/70 00:00 | |
how are numbers transmitted? | 01/01/70 00:00 | |
serial Tx code | 01/01/70 00:00 | |
Data type? | 01/01/70 00:00 | |
Data type? | 01/01/70 00:00 | |
serialangle data type | 01/01/70 00:00 | |
Just a question of readability | 01/01/70 00:00 | |
re: just a question of readability | 01/01/70 00:00 | |
why do you keep babbeling about 'float' | 01/01/70 00:00 | |
float reason | 01/01/70 00:00 | |
fixed point | 01/01/70 00:00 | |
re:fixed point | 01/01/70 00:00 | |
typecast | 01/01/70 00:00 |