src/grib_ieeefloat.c
/* 
 * To make these two routines consistent to grib_ieee_to_long and grib_long_to_ieee,
 * we should not do any byte swapping but rather perform a raw copy.
 * Byte swapping is actually implemented in grib_decode_unsigned_long and
 * grib_encode_unsigned_long.
 */
To make these two routines consistent to grib_ieee_to_long and grib_long_to_ieee,
we should not do any byte swapping but rather perform a raw copy.
Byte swapping is actually implemented in grib_decode_unsigned_long and
grib_encode_unsigned_long.
To make these two routines consistent to grib_ieee_to_long and grib_long_to_ieee we should not do any byte swapping but rather perform a raw copy . Byte swapping is actually implemented in grib_decode_unsigned_long and grib_encode_unsigned_long .
unsigned long grib_ieee64_to_long(double x)
{
    unsigned long lval;
    DebugAssert(sizeof(double) == sizeof(long));
    memcpy(&lval, &x, sizeof(long));
    return lval;
}
unsigned long grib_ieee64_to_long ( double x ) { unsigned long lval ; DebugAssert ( sizeof ( double ) == sizeof ( long ) ) ; memcpy ( & lval , & x , sizeof ( long ) ) ; return lval ; }
To make these two routines consistent to grib_ieee_to_long and grib_long_to_ieee,
 we should not do any byte swapping but rather perform a raw copy.
To make these two routines consistent to grib_ieee_to_long and grib_long_to_ieee we should not do any byte swapping but rather perform a raw copy .