From: | jian he <jian(dot)universality(at)gmail(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | src/include/utils/float.h comment one link stable |
Date: | 2025-10-06 12:51:07 |
Message-ID: | CACJufxGARYETnNwtCK7QC0zE_7gq-tfN0mME=gT5rTNtC=VSHQ@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2025-10-06 12:53:01 | Re: Changing the state of data checksums in a running cluster |
Previous Message | Laurenz Albe | 2025-10-06 12:07:47 | Re: The ability of postgres to determine loss of files of the main fork |