Hi,
I've include the header file "#icnlude <limits>" and using numeric_limits in my coding like numeric_limis<float>.min() and numeric_limis<float>.max().
However, a compilation error report to indicate the "numeric_limits" is undefined. I'm verified that the "numeric_limits" is working fine in Visual Studio.
Therefore, I'm wondering is it possible to get the numeric_limits support in IAR compiler, and am I missing out on any header file?
Appreciate if you can help to clarify the problem mentioned.
Thanks and Regards
Chris kok
Hi ChrisThis forum is for questions about Arm Development Studio.Sorry, I can't comment on the IAR tools - you will need to ask IAR. See https://www.iar.com/supportArm Compiler 6, as provided with Arm Development Studio, fully supports numeric_limits<float>::min() and numeric_limits<float>::max().For more information about its C/C++ libraries, see the Arm Compiler for Embedded Arm C and C++ Libraries and Floating-Point Support User Guide.A free 30-day evaluation of Arm Development Studio is available for download if you'd like to try it out.Hope this helpsStephen
Hi Stephen,
Thanks for your reply.
I found the answer already. The problem was due to I missed out the "std::". Once added in the "std::" as shown below, the problem resolved.
std::numeric_limits<float>::min() and std::numeric_limits<float>::max().
To using those standard library components, a "std::" is needed or have declaring the "using namespace std;" right after the include file.
Anyway, thank you very much.
Regards
Chris
Hi ChrisGlad to hear you solved the problem. Thanks for letting us know. For completeness, please could you mark this thread as "Answered".Stephen