From 593d0c490a05b9f35859969e24b583c79a414743 Mon Sep 17 00:00:00 2001 From: Raymond Lu Date: Mon, 31 Jan 2005 17:08:09 -0500 Subject: [svn-r9898] Purpose: Bug fix for test program Description: For Intel machines, the size of "long double" is 12 byte, precision is 80 bits, mantissa size is 64 bits, and no normalization. So the most significant bit of mantissa is always 1 unless the floating number has special value. This step tries to compensate this case by turning on the most significant bit of mantissa if the mantissa bits aren't all 0s. Solution: Tries to compensate this case by turning on the most significant bit of mantissa if the mantissa bits aren't all 0s. Platforms tested: eirene and fuss(production enabled). Small change for production only. --- test/dtypes.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/test/dtypes.c b/test/dtypes.c index 36431f7..d7ada50 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -2458,7 +2458,7 @@ test_derived_flt(void) } if(H5Tset_precision(tid1, 42)<0) { H5_FAILED(); - printf("Can't set precision\n"); + printf("Can't set precision 1\n"); goto error; } if(H5Tset_size(tid1, 7)<0) { @@ -2618,7 +2618,7 @@ test_derived_flt(void) } if(H5Tset_precision(tid2, 24)<0) { H5_FAILED(); - printf("Can't set precision\n"); + printf("Can't set precision 2\n"); goto error; } if(H5Tset_size(tid2, 3)<0) { @@ -6111,9 +6111,23 @@ test_conv_int_float(const char *name, hid_t src, hid_t dst) * will be used for the conversion while the `saved' buffer will be * used for the comparison later. */ - for (j=0; j