Ignore:
Timestamp:
10/18/17 14:07:51 (7 years ago)
Author:
tbretz
Message:
Updated to ERFA 1.4.0
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/erfa/src/jd2cal.c

    r18711 r18921  
    2222**               int      status:
    2323**                           0 = OK
    24 **                          -1 = unacceptable date (Note 3)
     24**                          -1 = unacceptable date (Note 1)
    2525**
    2626**  Notes:
     
    5151**     Section 12.92 (p604).
    5252**
    53 **  Copyright (C) 2013-2016, NumFOCUS Foundation.
     53**  Copyright (C) 2013-2017, NumFOCUS Foundation.
    5454**  Derived, with permission, from the SOFA library.  See notes at end of file.
    5555*/
     
    8282   f = fmod(f1 + f2, 1.0);
    8383   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;
    8686
    8787/* Express day in Gregorian calendar. */
     
    104104** 
    105105** 
    106 **  Copyright (C) 2013-2016, NumFOCUS Foundation.
     106**  Copyright (C) 2013-2017, NumFOCUS Foundation.
    107107**  All rights reserved.
    108108** 
Note: See TracChangeset for help on using the changeset viewer.