Changeset 18921 for trunk/FACT++/erfa/src/jd2cal.c
- Timestamp:
- 10/18/17 14:07:51 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/erfa/src/jd2cal.c
r18711 r18921 22 22 ** int status: 23 23 ** 0 = OK 24 ** -1 = unacceptable date (Note 3)24 ** -1 = unacceptable date (Note 1) 25 25 ** 26 26 ** Notes: … … 51 51 ** Section 12.92 (p604). 52 52 ** 53 ** Copyright (C) 2013-201 6, NumFOCUS Foundation.53 ** Copyright (C) 2013-2017, NumFOCUS Foundation. 54 54 ** Derived, with permission, from the SOFA library. See notes at end of file. 55 55 */ … … 82 82 f = fmod(f1 + f2, 1.0); 83 83 if (f < 0.0) f += 1.0; 84 d = floor(d1 - f1) + floor(d2 - f2) + floor(f1 + f2 -f);85 jd = (long) floor(d) + 1L;84 d = ERFA_DNINT(d1-f1) + ERFA_DNINT(d2-f2) + ERFA_DNINT(f1+f2-f); 85 jd = (long) ERFA_DNINT(d) + 1L; 86 86 87 87 /* Express day in Gregorian calendar. */ … … 104 104 ** 105 105 ** 106 ** Copyright (C) 2013-201 6, NumFOCUS Foundation.106 ** Copyright (C) 2013-2017, NumFOCUS Foundation. 107 107 ** All rights reserved. 108 108 **
Note:
See TracChangeset
for help on using the changeset viewer.