메인 콘텐츠로 건너뛰기
Knowledgebase
Home
Renesas Korea

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
 
  • 이 기사가 도움이 되셨나요?