Lines Matching +defs:y +defs:Q
681 uint32_t Q, R;
689 Q = (uint32_t)(sf64 ^ ((sf64 ^ ts->Q_s) / SECSPERDAY));
690 R = (uint32_t)(ts->Q_s - Q * SECSPERDAY);
702 Q = ~(uint32_t)(~ts->Q_s / SECSPERDAY);
704 Q = (uint32_t)( ts->Q_s / SECSPERDAY);
705 R = ts->D_s.lo - Q * SECSPERDAY;
754 Q = (al - R) * 0x2D21C10Bu; /* modinv(675, 2**32) */
759 res.hi = uint32_2cpl_to_int32(Q);
779 uint32_t Q, R;
788 Q = (uint32_t)(sf64 ^ ((sf64 ^ ts->Q_s) / SECSPERWEEK));
789 R = (uint32_t)(ts->Q_s - Q * SECSPERWEEK);
794 Q = ~(uint32_t)(~ts->Q_s / SECSPERWEEK);
796 Q = (uint32_t)( ts->Q_s / SECSPERWEEK);
797 R = ts->D_s.lo - Q * SECSPERWEEK;
814 Q = (al - R) * 0x98BBADDDu; /* modinv(4725, 2**32) */
819 res.hi = uint32_2cpl_to_int32(Q);
886 uint32_t uday, Q;
901 Q = (uint32_t)(sf64 ^ ((sf64 ^ ud64) / GREGORIAN_CYCLE_DAYS));
902 uday = (uint32_t)(ud64 - Q * GREGORIAN_CYCLE_DAYS);
903 n100 = uint32_2cpl_to_int32(Q);
927 Q = (ux - uday) * 660721233u; /* exact div */
928 n100 = uint32_2cpl_to_int32(Q);
1362 uint32_t mu, Q, sf32;
1365 Q = sf32 ^ ((sf32 ^ mu) / 12u);
1367 res.hi += uint32_2cpl_to_int32(Q);
1368 res.lo = mu - Q * 12u;
1643 * Convert date to NTP. Ignore yearday, use d/m/y only.
1745 * w = floor( y * a + b )
1758 * w = (y * a + b ) / k
1759 * y = (w * a' + b') / k'
1779 * use: w = (y * 53431 + b[c]) / 1024 as interpolation
1827 * use: y = (w * 157 + b[c]) / 8192 as interpolation
1834 uint32_t sw, cy, Q;
1852 Q = (uint32_t)(sf64 ^ ((sf64 ^ sw64) / GREGORIAN_CYCLE_WEEKS));
1853 sw = (uint32_t)(sw64 - Q * GREGORIAN_CYCLE_WEEKS);
1868 Q = (ux - sw) * 330081335u; /* exact div */
1872 ci = Q & 3u;
1873 cc = uint32_2cpl_to_int32(Q);
2021 u_short y,m,d;
2027 rc = sscanf(str, "%4hu-%2hu-%2hu%n", &y, &m, &d, &nc);
2030 return ntpcal_edate_to_eradays(y-1, m-1, d)
2147 uint32_t y,
2184 if ((y >= 100u) || (--m >= 12u) || (--d >= 31u))
2189 else if (--y >= 100u)
2190 y += 100u;
2191 d += y + (y >> 2) + 2u; /* year share */
2204 if ((m > 9u) && (++y >= 100u)) {/* undo base shift */
2205 y -= 100u;
2208 y += (c * 100u); /* combine into 1st cycle */
2209 y += (y < 300u) ? 2000 : 1600; /* map to destination era */
2210 return (int)y;