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.
This commit is contained in:
Thomas G. Lockhart 1998-05-31 17:08:35 +00:00
parent ff84c98a65
commit 345b0f6b99

View File

@ -8,7 +8,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * 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 #endif
#define TIMESPAN_NOT_FINITE(j) TIMESPAN_IS_INVALID(j) #define TIMESPAN_NOT_FINITE(j) TIMESPAN_IS_INVALID(j)
#define TIME_PREC 1e-6 #define TIME_PREC_INV 1000000.0
#define JROUND(j) (rint(((double) (j))/TIME_PREC)*TIME_PREC) #define JROUND(j) (rint(((double) (j))*TIME_PREC_INV)/TIME_PREC_INV)
/* /*
* dt.c prototypes * dt.c prototypes