Home
last modified time | relevance | path

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

/external/python/cpython3/Python/
Dpytime.c144 volatile double floatpart; in _PyTime_DoubleToDenominator() local
146 floatpart = modf(d, &intpart); in _PyTime_DoubleToDenominator()
148 floatpart *= denominator; in _PyTime_DoubleToDenominator()
149 floatpart = _PyTime_Round(floatpart, round); in _PyTime_DoubleToDenominator()
150 if (floatpart >= denominator) { in _PyTime_DoubleToDenominator()
151 floatpart -= denominator; in _PyTime_DoubleToDenominator()
154 else if (floatpart < 0) { in _PyTime_DoubleToDenominator()
155 floatpart += denominator; in _PyTime_DoubleToDenominator()
158 assert(0.0 <= floatpart && floatpart < denominator); in _PyTime_DoubleToDenominator()
165 *numerator = (long)floatpart; in _PyTime_DoubleToDenominator()
/external/python/cpython3/Lib/test/
Dtest_time.py998 floatpart, intpart = math.modf(secs)
1000 floatpart *= sec_to_unit
1001 floatpart = self.decimal_round(floatpart)
1002 if floatpart < 0:
1003 floatpart += sec_to_unit
1005 elif floatpart >= sec_to_unit:
1006 floatpart -= sec_to_unit
1008 return (intpart, floatpart)