Question

I'm using C++ Builder XE and want to check a float value is valid. According to the help, in math.h, there's a call

bool IsNan(float value)

However, when I try to compile this, it tells me

Call to undefined function 'IsNan'

Looking in math.h, there's no such thing as isnan (I used a non-case sensitive search)

Am I doing something silly, or what ?

Was it helpful?

Solution

To use the Embarcadero inbuilt IsNan() function you need to include (for XE4 anyway)

#include <System.Math.hpp>

If you are using basic XE then you need

#include <Math.hpp>

The latter also works on XE4 although the help indicates that System.Math.hpp is needed.

OTHER TIPS

On the forum "Embarcadero Discussion Forums » C++Builder » C++ Language" Roger Dunk wrote: std::_isnan()

This solved the error for me ...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top