Home
last modified time | relevance | path

Searched refs:floatpart (Results 1 – 2 of 2) sorted by relevance

/external/python/cpython3/Python/
Dpytime.c138 volatile double floatpart; in _PyTime_DoubleToDenominator() local
140 floatpart = modf(d, &intpart); in _PyTime_DoubleToDenominator()
142 floatpart *= denominator; in _PyTime_DoubleToDenominator()
143 floatpart = _PyTime_Round(floatpart, round); in _PyTime_DoubleToDenominator()
144 if (floatpart >= denominator) { in _PyTime_DoubleToDenominator()
145 floatpart -= denominator; in _PyTime_DoubleToDenominator()
148 else if (floatpart < 0) { in _PyTime_DoubleToDenominator()
149 floatpart += denominator; in _PyTime_DoubleToDenominator()
152 assert(0.0 <= floatpart && floatpart < denominator); in _PyTime_DoubleToDenominator()
159 *numerator = (long)floatpart; in _PyTime_DoubleToDenominator()
/external/python/cpython3/Lib/test/
Dtest_time.py1009 floatpart, intpart = math.modf(secs)
1011 floatpart *= sec_to_unit
1012 floatpart = self.decimal_round(floatpart)
1013 if floatpart < 0:
1014 floatpart += sec_to_unit
1016 elif floatpart >= sec_to_unit:
1017 floatpart -= sec_to_unit
1019 return (intpart, floatpart)