Skip to main content
Knowledgebase
Home
Renesas Electronics Europe - Knowledgebase

Float Calculation Overflowed: A return value or an error code?

Latest Updated:12/01/2011

Question:

When the float/float calculation result has overflowed, is the return value from the function the maximum value?
Or is it an error code?

Answer:

The value returned from the function is either positive or negative infinity.
Additionally, matherr is called and ERANGE(=2) is set to errno.
Suitable Products