diff options
author | Thomas G. Lockhart <lockhart@fourpalms.org> | 1998-05-31 17:08:35 +0000 |
---|---|---|
committer | Thomas G. Lockhart <lockhart@fourpalms.org> | 1998-05-31 17:08:35 +0000 |
commit | 345b0f6b999f2c0aa4303bedbeaeb2c71987e684 (patch) | |
tree | 0a3958c14489135dc40eabe2165aeef4bd585629 /src | |
parent | ff84c98a659a958bdcc0cbfb61821c10d93ba1f4 (diff) | |
download | postgresql-345b0f6b999f2c0aa4303bedbeaeb2c71987e684.tar.gz postgresql-345b0f6b999f2c0aa4303bedbeaeb2c71987e684.zip |
Rewrite JROUND macro to multiply by 1e6 rather than divide by 1e-6
and vica versa for the next operation.
This is reputed to fix inline math optimization troubles in glibc-2.0.x.
Regression tests still pass on libc/i686 machine. Patch suggested by Matt.
Diffstat (limited to 'src')
-rw-r--r-- | src/include/utils/dt.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/utils/dt.h b/src/include/utils/dt.h index 7c732e483ec..b3ccab76968 100644 --- a/src/include/utils/dt.h +++ b/src/include/utils/dt.h @@ -8,7 +8,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: dt.h,v 1.29 1998/05/09 22:43:50 thomas Exp $ + * $Id: dt.h,v 1.30 1998/05/31 17:08:35 thomas Exp $ * *------------------------------------------------------------------------- */ @@ -258,8 +258,8 @@ extern int datetime_is_epoch(double j); #endif #define TIMESPAN_NOT_FINITE(j) TIMESPAN_IS_INVALID(j) -#define TIME_PREC 1e-6 -#define JROUND(j) (rint(((double) (j))/TIME_PREC)*TIME_PREC) +#define TIME_PREC_INV 1000000.0 +#define JROUND(j) (rint(((double) (j))*TIME_PREC_INV)/TIME_PREC_INV) /* * dt.c prototypes |