Skip to main content
Knowledgebase
Home
Renesas Electronics Europe - Knowledgebase

What is the result of dividing a value by 0 by -1 ?

Question:

What is the result of dividing a value by 0 or dividing a maximum negative value (0x8000 for short type) by -1 ?

Answer:

The results vary depending on the device used.
For short type, the results may vary depending on the target device because the divide instruction of the actual device is used, instead of a library function.
If a library function is used in the CA850, the MATHERR function returns Z_DIVISION for division by 0.
Suitable Products