Piotr Caban piotr.caban@gmail.com writes:
Some functions needs to return NAN. The other possibility of implementing it is following:
static inline DOUBLE ret_nan(void) { VARIANT v; num_set_nan(&v); return V_R8(&v); }
or
#ifdef NAN static inline DOUBLE ret_nan(void) { return NAN; } #else static inline DOUBLE ret_nan(void) { VARIANT v; num_set_nan(&v); return V_R8(&v); } #endif
But both of these methods are probably even uglier. Do you have any suggestions how should I implement it?
The first one is fine.