|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#10
|
|||||
|
|||||
|
Re: Math Gone Wrong
One other solution is to use the option in MPLAB to force the default use of the integer type (at least) in any calculations. You still need to be aware of the potential for overflow, e.g., any calculation with an intermediate result > 32767 for instance.
Project -> Build Options… -> Project MPLAB C18 tab Check “Enable integer promotions” |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New math functions? | KVermilion | Programming | 8 | 17-01-2005 10:38 |
| I-cylinder body wrong? | Daniel Brim | Inventor | 0 | 05-03-2004 20:18 |
| Wrong Math in the site info section.. | Matt Attallah | CD Forum Support | 9 | 10-06-2003 16:43 |
| direct Drill motor drive wrong or right | rcubes85 | General Forum | 6 | 11-02-2003 18:11 |
| Whats wrong with this code? | Morgoth | Programming | 4 | 19-01-2003 11:45 |