MCPcopy Create free account
hub / github.com/MyGUI/mygui / gen_nan

Function gen_nan

Tools/EditorFramework/pugixml.cpp:6906–6921  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6904};
6905
6906PUGI__FN double gen_nan()
6907{
6908 #if defined(__STDC_IEC_559__) || ((FLT_RADIX - 0 == 2) && (FLT_MAX_EXP - 0 == 128) && (FLT_MANT_DIG - 0 == 24))
6909 union
6910 {
6911 float f;
6912 uint32_t i;
6913 } u[sizeof(float) == sizeof(uint32_t) ? 1 : -1];
6914 u[0].i = 0x7fc00000;
6915 return u[0].f;
6916 #else
6917 // fallback
6918 const volatile double zero = 0.0;
6919 return zero / zero;
6920 #endif
6921}
6922
6923PUGI__FN bool is_nan(double value)
6924{

Callers 3

convert_string_to_numberFunction · 0.70
get_numberMethod · 0.70
evaluate_numberMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected