src/include/utils/float.h comment one link stable
От | jian he |
---|---|
Тема | src/include/utils/float.h comment one link stable |
Дата | |
Msg-id | CACJufxGARYETnNwtCK7QC0zE_7gq-tfN0mME=gT5rTNtC=VSHQ@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: src/include/utils/float.h comment one link stable
Re: src/include/utils/float.h comment one link stable |
Список | pgsql-hackers |
hi. src/include/utils/float.h /* * Routines to provide reasonably platform-independent handling of * infinity and NaN * * We assume that isinf() and isnan() are available and work per spec. * (On some platforms, we have to supply our own; see src/port.) However, * generating an Infinity or NaN in the first place is less well standardized; * pre-C99 systems tend not to have C99's INFINITY and NaN macros. We * centralize our workarounds for this here. */ /* * The funny placements of the two #pragmas is necessary because of a * long lived bug in the Microsoft compilers. * See http://support.microsoft.com/kb/120968/en-us for details */ #ifdef _MSC_VER #pragma warning(disable:4756) #endif static inline float4 get_float4_infinity(void) { #ifdef INFINITY /* C99 standard way */ return (float4) INFINITY; #else #ifdef _MSC_VER #pragma warning(default:4756) #endif /* * On some platforms, HUGE_VAL is an infinity, elsewhere it's just the * largest normal float8. We assume forcing an overflow will get us a * true infinity. */ return (float4) (HUGE_VAL * HUGE_VAL); #endif } this link (http://support.microsoft.com/kb/120968/en-us) is stale.
В списке pgsql-hackers по дате отправления: