Home
last modified time | relevance | path

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

/third_party/python/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()
/third_party/python/Lib/test/
Dtest_time.py1000 floatpart, intpart = math.modf(secs)
1002 floatpart *= sec_to_unit
1003 floatpart = self.decimal_round(floatpart)
1004 if floatpart < 0:
1005 floatpart += sec_to_unit
1007 elif floatpart >= sec_to_unit:
1008 floatpart -= sec_to_unit
1010 return (intpart, floatpart)