Originally Posted by

**Rich B.** Hi:

Given input hours=h,

h hrs = floor(h) hrs, 60*(h-floor(h)) min.

Ex.: input: h=1.3

flr(h)=flr(1.3)=1

60*(h-floor(h)) = 60*(1.3 - 1) = 60*0.3 = 18.

Output: 1.3 hrs = 1hr, 18 min.

Notes: (h-floor(h)) is just the "fractional" component, 0.3 in the given example. Substitutions are, therefore, frac(h) and (60*h)mod(60). Similarly, viable substitutions for flr(h) are, h-frac(h), h-(60*h)mod(60).

These things said, the algorithm in black becomes,

h hrs = flr(h) hrs, 60*(frac(h)) min.

Regards,

Rich B.