summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-07-06 23:02:32 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-07-06 23:02:32 (GMT)
commitcf419d05ab65b423bc4ce395972e84522ca3eec5 (patch)
tree6f689a9e56f4e251f51aacec02a067b9f8d232a1 /src/H5Tconv.c
parent4d3351f1d777bc3cb891443b6165a87251d4e643 (diff)
downloadhdf5-cf419d05ab65b423bc4ce395972e84522ca3eec5.zip
hdf5-cf419d05ab65b423bc4ce395972e84522ca3eec5.tar.gz
hdf5-cf419d05ab65b423bc4ce395972e84522ca3eec5.tar.bz2
[svn-r454] Changes since 19980702
---------------------- ./src/H5T.c Prints statistics for no-op conversions also. For now, hardware floating point conversions may or may not raise SIGFPE depending on the hardware, operating system, etc. Software conversions never raise SIGFPE and use +Inf or -Inf for overflow. ./test/dtypes.c Catches SIGFPE and causes the test to be skipped. Better test for NaN. ./config/irix5.3 Removed the -U_POSIX_SOURCE because it was removed from the main makefiles. ./bin/trace ./src/H5S.c Fixed a typo that prevented tracing info from being added to new API functions.
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r--src/H5Tconv.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 800a9ea..930b330 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -13,7 +13,6 @@
#include <H5Eprivate.h>
#include <H5MMprivate.h>
#include <H5Tpkg.h>
-#include <float.h> /*for FLT_MAX and FLT_MIN */
#include <math.h> /*for ceil() */
/* Conversion data for H5T_conv_struct() */
@@ -1350,19 +1349,8 @@ H5T_conv_double_float (hid_t __unused__ src_id, hid_t __unused__ dst_id,
s = (double*)buf;
d = (float*)buf;
- /*
- * We have to watch out because some machines generate a SIGFPE if
- * the source has a larger magnitude than can be represented in the
- * destination.
- */
- for (elmtno=0; elmtno<nelmts; elmtno++, d++, s++) {
- if (*s > FLT_MAX) {
- *d = FLT_MAX;
- } else if (*s < -FLT_MAX) {
- *d = -FLT_MAX;
- } else {
- *d = *s;
- }
+ for (elmtno=0; elmtno<nelmts; elmtno++) {
+ *d++ = *s++;
}
break;