| ??? 03/13/03 12:12 Read: times |
#41417 - RE: Floating point maths Responding to: ???'s previous message |
Yes it can be done and is not a crime to do FP in MCU's. Agreed they dont have flashy grades for thier maths prowess. So why would you do FP calculations ? - one of the reason being to maintain accuracy. So far I have been able to get away with the following simple method. Lets say you have to divide 10 by another variable that can vary from 1 to 12. So obviously you can get either a 10 as quotient or zero when the variable is 11 and 12 at the extreme ends. Not acceptable. So what you do is to multiply 10 by 10 - you get 100 which is still within 8 bits. Now divide this by the variable - you will now get qoutients that are 1 shade better ( etill remember you get only inetegers). Not accurate enough ? No problem -multiply 10 by 100 .... you are already into 1 digit decimal precison but will need 16 bits. Still no problem. OK this method HAS its limitations but I have been lucky enough to get away with it. Anyway I am now on to some FP maths - lets see. Raghu |
| Topic | Author | Date |
| Floating point maths | 01/01/70 00:00 | |
| RE: Floating point maths | 01/01/70 00:00 | |
| RE: Floating point maths | 01/01/70 00:00 | |
| RE: Floating point maths | 01/01/70 00:00 | |
| RE: Floating point maths | 01/01/70 00:00 | |
| RE: Floating point maths Jon | 01/01/70 00:00 | |
| RE: Floating point maths | 01/01/70 00:00 | |
RE: Floating point maths | 01/01/70 00:00 |



