src/include/utils/float.h comment one link stable - Mailing list pgsql-hackers

From jian he
Subject src/include/utils/float.h comment one link stable
Date
Msg-id CACJufxGARYETnNwtCK7QC0zE_7gq-tfN0mME=gT5rTNtC=VSHQ@mail.gmail.com
Whole thread Raw
Responses Re: src/include/utils/float.h comment one link stable
Re: src/include/utils/float.h comment one link stable
List 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 by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: The ability of postgres to determine loss of files of the main fork
Next
From: Daniel Gustafsson
Date:
Subject: Re: Changing the state of data checksums in a running cluster