public static function Tdbtcb($tdb1, $tdb2, &$tcb1, &$tcb2) {
    /* 1977 Jan 1 00:00:32.184 TT, as two-part JD */
    $t77td = DJM0 + DJM77;
    $t77tf = TTMTAI / DAYSEC;

    /* TDB (days) at TAI 1977 Jan 1.0 */
    $tdb0 = TDB0 / DAYSEC;

    /* TDB to TCB rate */
    $elbb = ELB / (1.0 - ELB);

    $d;
    $f;

    /* Result, preserving date format but safeguarding precision. */
    if ($tdb1 > $tdb2) {
      $d    = $t77td - $tdb1;
      $f    = $tdb2 - $tdb0;
      $tcb1 = $tdb1;
      $tcb2 = $f - ( $d - ( $f - $t77tf ) ) * $elbb;
    }
    else {
      $d = t77td - $tdb2;
      $f = $tdb1 - $tdb0;
      $tcb1 = $f + ( $d - ( $f - $t77tf ) ) * $elbb;
      $tcb2 = $tdb2;
    }

    /* Status (always OK). */
    return 0;
  }