[svn-r8509] *** empty log message ***

This commit is contained in:
Raymond Lu
2004-05-12 16:43:21 -05:00
parent 831c8d9dfd
commit cee32cf3a8

View File

@@ -4530,6 +4530,20 @@ test_conv_int_float(const char *name, hid_t src, hid_t dst)
} /* end if */
#endif /* end H5_ULONG_FP_BOTTOM_BIT_WORKS */
/* For PGI compiler on Linux, during conversion from 'float' or 'double' to
* 'unsigned long long', round-up happens when the fraction of float-point
* value is greater than 0.5. So we allow the converted value to be off by 1.
*/
#ifndef H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS
if((src_type==FLT_FLOAT || src_type==FLT_DOUBLE) && dst_type==INT_ULLONG) {
unsigned long_long tmp_s, tmp_h;
HDmemcpy(&tmp_s,&buf[j*dst_size],sizeof(unsigned long_long));
HDmemcpy(&tmp_h,&hw[0],sizeof(unsigned long_long));
if((tmp_s+1)==tmp_h)
continue; /*no error*/
}
#endif /*end H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS*/
/* Print errors */
if (0==fails_this_test++)
H5_FAILED();